A simple clean REST API built with NodeJS, express with a n-tier architecture (organized into layers).
- Make sure you have NodeJS v14 or newer innstalled.
- Run
npm cito install all dependencies. npm startto start your API on port4000.- You can change the port by editing
src/server.jsand changingconst port = 4000;to another port number.
- You can change the port by editing
- Download Insomnia or Postman to send easily HTTP requests to your API.
npm testOr with npx
npx ava- Make sure Podman is correctly installed on your machine - https://podman.io/getting-started/installation
- From a command line opened , run
podman machine init, and thenpodman machine start - Then, in the project folder (still from your terminal), let's build the image with
podman build -t simple-api-image . - Once it has finished and the image successfully built, you should be able to see it by typing
podman images - Finally, let's run the image container by typing
podman run -p 4000:4000 simple-api-image- Here, we use port4000, and map it to the local port4000.
To make our job easier, this API uses the some great handy libraries such as...
- NIYIBIZI Elysée👨🏿💻 | Github | Linkedin | Twitter.
This project is distributed under MIT license. Enjoy! 🎉