This is a basic API skeleton written in JavaScript ES2015. It uses modbus serial to connect to Arduino Uno programmed with OpenPLC, read the coils and send the web API response in JSON
- JWT Tokens is available to implement, make requests with a token after login with
Authorization
header with valueBearer yourToken
whereyourToken
will be returned in Login response. - Pre-defined response structures with proper status codes.
- Light-weight project.
- Linting with Eslint.
- Node.js 8+
- modbus-serial
- serialport
- Clone the project from github. Change "myproject" to your project name.
- Download repository
- Uncompress to your desired directory
cd myproject
npm install
npm run dev
You will know server is running by checking the output of the command npm run dev
Every project needs improvements, Feel free to report any bugs or improvements. Pull requests are always welcome.
This project is open-sourced software licensed under the MIT License. See the LICENSE file for more information.