Skip to content

This tutorial walks through the project structure, implementing the controller, service, router and using the dependency injection pattern in a nodejs express application.

Notifications You must be signed in to change notification settings

csalazar94/scalable-express-tutorial

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Building a Flexible and Scalable Node.js Backend with Express: A Step-by-Step Tutorial

This tutorial walks through the project structure, implementing the controller, service, router and using the dependency injection pattern in a nodejs express application.

Installation

You can follow this tutorial and understand how this project work on this medium link.

npm install

Usage

npm start

API Endpoints

POST /users

Create a new user.

Request Body

{
  "name": "John Doe",
  "email": "johndoe@example.com",
  "password": "password123"
}

Response Body

{
  "id": 1,
  "name": "John Doe",
  "email": "johndoe@example.com"
}

GET /users

Get a list of all users.

Response Body

[
  {
    "id": 1,
    "name": "John Doe",
    "email": "johndoe@example.com"
  },
  {
    "id": 2,
    "name": "Jane Smith",
    "email": "janesmith@example.com"
  }
]

GET /users/:id

Get one user by id.

Response Body

{
    "id": 1,
    "name": "John Doe",
    "email": "johndoe@example.com"
}

About

This tutorial walks through the project structure, implementing the controller, service, router and using the dependency injection pattern in a nodejs express application.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published