AL-REST
AL-REST is a lightweight class and event based rest server.
How to use example
To run the code in the example do these steps
- Clone repo
- Run
npm install
- Run
npm start
- Admire webserver
- Edit code
- Repeat steps 3-5
How to use somewhere else
Follow these steps, I don't care if there's a lot. Maybe I'll make a repo of this example, but I'm lazy :D
- Create new directory
- Run
npm init
and follow wizard- Set
node src/app.js
as test command
- Set
- Run
npm install git+https://github.com/AL1L/AL-REST.git
- Create these directorys
- src
- src/endpoints
- data
- Create these files
- src/app.js
- src/endpoints/hello.js
- data/server.json
src/app.js:
; const server = 'data/server.js';serveremloaderserverstart;
src/endpoints/hello.js:
;; // The name of the class doesn't matter { superem; this; } { return urlpath === '/'; } { requestres; }
data/server.json:
- Run
npm run test
- Yay!