pH-7 / ProjectU-simple-clean-nodeJS-API

A simple clean REST API built with NodeJS, express with a n-tier architecture (organized into layers). My Udemy course explaining how to build it is available at: https://www.udemy.com/course/build-backend-api-node-js-and-react-frontend/

Home Page:https://www.udemy.com/course/build-backend-api-node-js-and-react-frontend/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ProjectU Simple clean NodeJS API

A simple clean REST API built with NodeJS, express with a n-tier architecture (organized into layers). My Udemy course explaining how to build it is available at: https://www.udemy.com/course/build-backend-api-node-js-and-react-frontend/learn/lecture/33130370#overview

Setting Up

  • Make sure you have NodeJS v14 or newer innstalled.
  • Run npm ci to install all dependencies.
  • npm start to start your API on port 4000.
    • You can change the port by editing src/server.js and changing const port = 4000; to another port number.
  • Download Insomnia or Postman to send easily HTTP requests to your API.
    • In this Udemy course, I will be using Insomnia v4.2, so Insomnia would be the recommended one.

Running unit tests

npm test

Or with npx

npx ava

Running it with Podman

  1. Make sure Podman is correctly installed on your machine - https://podman.io/getting-started/installation
  2. From a command line opened , run podman machine init, and then podman machine start
  3. Then, in the project folder (still from your terminal), let's build the image with podman build -t simple-api-image .
  4. Once it has finished and the image successfully built, you should be able to see it by typing podman images
  5. Finally, let's run the image container by typing podman run -p 4000:4000 simple-api-image - Here, we use port 4000, and map it to the local port 4000.

3rd-party libraries

To make our job easier, this API uses the some great handy libraries such as...

Author

Pierre-Henry Soria

I'm Pierre-Henry Soria πŸ‘‹

A super passionate Belgian software engineer πŸ€— And a true cheese πŸ§€ & chocolate 🍫 lover! πŸ˜‹ You can reach me at hi {[AT]} ph7 [{D0T}] me

LinkedIn @phenrysay pH-7

Context

This is the final source code and completed project of my Udemy Course, Learn how to build a Backend REST API with Node JS.

License

This project is distributed under MIT license. Enjoy! πŸŽ‰

About

A simple clean REST API built with NodeJS, express with a n-tier architecture (organized into layers). My Udemy course explaining how to build it is available at: https://www.udemy.com/course/build-backend-api-node-js-and-react-frontend/

https://www.udemy.com/course/build-backend-api-node-js-and-react-frontend/

License:MIT License


Languages

Language:JavaScript 96.2%Language:Dockerfile 3.8%