ExpressJS HTTP server that features two endpoints,
- POST /api/facts/find
- POST /api/facts/insert
NOTE - If you want to just run the server locally: do step 1, then skip to the "Run the application in Docker container" step below.
NOTE - make sure to use Node v14. Node version is also specified in .nvmrc and package.json.
- Clone the repo
> git clone ...
- Install NPM dependencies
server> npm i
- Create .env file
server> cp .env.example .env
server> npm run start
server> npm run start:dev
server> npm run start:debug
- Debug Node.js application in WebStorm
- Debug Node.js application in Visual Studio Code
> docker run -p 3000:3000 -it $(docker build -q .)
server> npm run test
HTTP tests are located in server/tests/http
and can be executed in an IDE.
- HTTP client in WebStorm
- How to test HTTP REST API easily with Visual Studio Code