Facebook Server

Description

It is a custom server that can be used to create update delete user and run the facebook clone application.

Email Validation (./helpers/Validation.js)

Email Validation Snippet

Length Validation (./helpers/Validation.js)

Length Validation Snippet

User Model Schema (./models/user.js)

User Model Schema

Username Validation (./helpers/Validation.js)

Username Validation

JWT Token (./helpers/token.js)

  • Generate Token Generate From Controller
  • Token Generator JWT Token

Email Verification (./helpers/mailer.js)

  • UserController.js Email Verification From Controller
  • Mailer Mailer

Server.js

Server

Requirements

  • Node.js
  • Express.js
  • MongoDB
  • React.js

Start

cd backend
npm install
npm run server

cd frontend
npm install
npm start

Server Code

200 - OK
201 - Created
202 - Accepted
204 - No Content
400 - Bad Request
401 - Unauthorized
403 - Forbidden
404 - Not Found
500 - Internal Server Error
501 - Not Implemented
502 - Bad Gateway
503 - Service Unavailable
504 - Gateway Timeout
505 - HTTP Version Not Supported
506 - Variant Also Negotiates
507 - Insufficient Storage
508 - Loop Detected
510 - Not Extended
511 - Network Authentication Required
599 - Network Connect Timeout Error
599 - Network read timeout error

GitHub

View Github