GithubHelp home page GithubHelp logo

tuantransn2001 / erp-api Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 28.84 MB

This is a my side project for an ERP (Enterprise Resource Planning) system API, built with Express.js.

TypeScript 99.70% JavaScript 0.30%

erp-api's Introduction

REST API for ERP application

This is a bare-bones example of a Sinatra application providing a REST API to a DataMapper-backed model.

The entire application is contained within the app.rb file.

config.ru is a minimal Rack configuration for unicorn.

run-tests.sh runs a simplistic test and generates the API documentation below.

It uses run-curl-tests.rb which runs each command defined in commands.yml.

Install

npm install

Run the app

<-> Development
npm run build:dev
npm run build:dev:start

<-> Production
npm run build:prod
npm run build:prod:start

Run the tests

npm run test

REST API

The REST API to the ERP-API is described in src/api/v2/documents/*.

HealthCheck

Request

GET /health/

curl -i -H 'Accept: application/json' http://localhost:8000/health

Response

HTTP/1.1 200 OK
Date: Thu, 24 Feb 2011 12:36:30 GMT
Status: 200 OK
Connection: close
Content-Type: application/json
Content-Length: 2

// 20230810214507
// http://localhost:8000/health

{
    "message": "Success",
    "data": {
        "uptime": 53.131220583,
        "message": "Ok",
        "date": "2023-08-10T14:45:07.647Z"
    }
}

erp-api's People

Contributors

tuantransn2001 avatar

Watchers

 avatar

erp-api'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.