Coder Social home page Coder Social logo

peasy / peasy-js-samples Goto Github PK

View Code? Open in Web Editor NEW
20.0 4.0 2.0 2.3 MB

Showcases business logic built with peasy-js and consumed by multiple clients

License: MIT License

JavaScript 63.65% HTML 4.04% CSS 0.25% TypeScript 32.04% Shell 0.01%
sample-application sample-app order-management peasy-js express-js reactjs react angular nodejs mongodb

peasy-js-samples's Introduction

peasy

Showcases business logic built with peasy-js.

This sample application is a ficticious order entry / inventory management system. All efforts were made to keep this application as simple as possible, with a focus on how business logic can be written with peasy-js and consumed by multiple clients (react, angular, and nodejs).

Where can I get it?

Requirements

  1. nodejs - this application hosts a web api that the client applications rely on and requires node.
  2. postman, fiddler, cURL, or similar (optional) - these tools help to facilitate communications with http endpoints.
  3. MongoDB (optional) - this application by default is configured to work with in-memory data proxies, however, you can easily swap data proxies to interact with a mongodb instance if desired. See MongoDB Configuration for more details.

Running the application

From a command line, navigate to the peasy-js-samples directory and run:

  1. npm run install_dependencies_and_build_projects
  2. npm run server

samples

By default, the client (react and angular) applications are configured to use http implementations of the data proxies. These data proxies communicate with the http endpoints hosted in node.

In turn, the http endpoints are configured to use in-memory data proxies. However, there are a few configuration possibilities. The configurations section provides details on setting up many potential configurations.

Configurations

Client → In-Memory

In this scenario, the client consumes business services that are injected with data proxies that communicate with in-memory data stores.

archlessnode

Client → Web API → In-Memory (Default configuration)

In this scenario, the client consumes business services that are injected with data proxies that use HTTP to communicate with the Web API application. In turn, the Web API application uses business services that are injected with data proxies that communicate with in-memory data stores.

archlessmongo

Client → Web API → MongoDB

In this scenario, the client consumes business services that are injected with data proxies that use HTTP to communicate with the Web API application. In turn, the Web API application uses business services that are injected with data proxies that communicate with a MongoDB database.

architecture

Testing out the Web API

With the application up and running you can navigate to the following urls:

Web API Walkthrough

This walkthrough covers creating a customer, category, product, and placing an order on behalf of the new customer. It also covers submitting and shipping an order to see how it affects inventory.

Like what you see?

Please consider showing your support by starring the project.

peasy-js-samples's People

Contributors

ahanusa avatar njacques avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

njacques ziyadoo

peasy-js-samples's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.