Skip to content

LPIX-11/nodejs-restful-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

76 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Nodejs - Restful Api

Codacy Badge

Overview

RESTful API design with Node.js Nodejs Restful API with jwt and mongodb Connection using mongoose.

Set Up Environment

First you need to have a mongodb installation. You can refer here to install an instance:

Then install nodejs

After that you'll have access to yarn (Nodejs Package Manager). Now you can install additionnal dependencies

# Go inside the project
cd nodejs-restful-api

# Install all dependencies
yarn

# For nodejs live reload when file changes in the directory are detected install nodemon
npm  install -g nodemon

# You start the api by hitting
yarn
# Or
node server.js

Structure

Routes
    { get; }
    * Retrieve Informations about users
    - /users
    - /users/:id

    * Register informations or Login
    { post; }
    - /auth/register
    - /auth/login

    * Go to user profile
    { get; }
    - /auth/me
    
    * Edit user's informations
    { patch; }
    - /auth/edit

Models

User
    -_id [Generated]
    - name
    - surname
    - email
    - password
    * profile
Usefull Tips

About

Nodejs Restful API with jwt and mongodb Connection using mongoose

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •