Git Product home page Git Product logo

natours's Introduction

Practice Node, Manipulate JSON file with File Sync, API, Midleware, routes, and controllers


Requirements

  • Bahasa

    • NodeJS (12.18.0)
    • JSX
  • Services

    • Morgan (Midleware)
    • express (Framework)
  • DBMS

    • MongoDB
    • Compass (GUI For MongoDB)
    • Mongoose (Connector Schema, Agregrations)
  • Pre Host Documents

    • Atlas (AWS)

Deploy On Heroku :


Route API :

Route Endpoind Method Calback
User LogIn https://natours-middleware.herokuapp.com/api/v1/user/login POST Token
User Register https://natours-middleware.herokuapp.com/api/v1/user/signup POST JWT Token
Tours https://natours-middleware.herokuapp.com/api/v1/tours GET JSON Data
  • Postman Setup

    • Register (RAW | JSON) BODY

      {
        "name": "Maria",
        "email": "[email protected]",
        "password": "maria123",
        "passwordConfirm": "maria123",
      }
    • Login (RAW | JSON) BODY

      {
        "email": "[email protected]",
        "password": "maria123",
      }

About The Practical :

  • How to Call/Read JSON file on Node :

    • Read File JSON fs(FileStream) with FileSync
    • export to View Function
  • Works with Express (Framework bassed on NodeJS) :

    • Install nodemon (npm install nodemon --save)
    • setting up nodemon to our app
    • Install express (npm install express --save)
    • Import Express to our app
    • Setting up Local Port Server
  • How to API works on Node :

    • function request and result
    • Make Method GET request dan Result
    • Make Method GET Params request and Result (Param)
    • Make Method POST request and Result
    • Make Method PATCH request and Result
    • Make Method DELETE request
  • How to Routes work on Node:

    • Setting up Route use express
    • Base Struktur Route on express
  • How to use Third party Middleware or own:

    • Setting Up Middleware
    • Install Third Party Middleware with Morgan
    • Install Morgan (npn install morgan --save)
    • exports Module
  • Setting Up MongoDB with Compass:

    • Install and Settup MongoDB with Shell & Compass
    • Connect our GUI Compass with Atlas DB
    • Connect our App With Atlas DB and Compas Localy GUI
    • Setting Up our App with Localy MongoDB Document
  • Refactoring API Route

    • Refactor File for express Route
    • Group endpoint Based on Route
  • More Complex Filtering

    • Filter endpoint With JSX Callback Fungtion
    • Filter endpoint With Mongo Operator
    • Multiple Filter endpoint with Params
  • Modeling User Auth and Use JWT(jsonwebtoken)

    • Create Model for Users Login
    • Create Function SignUp
    • Create Function Login
    • Use JWT for Token Authentication Login
    • Use JWT for Protect the Route
  • More Complex Authetication

    • Create Function Forgot Password
    • Create Function Reset Password
    • Reset Current User data
    • Create Update Curent Password and Token
    • Send Reset Token to email Tested Work Use Mailtrap
    • Use the Nodemailer to setup incomming email server
    • Reset Fungtion Done!
  • Handle The Security (BEST PRACTICE)

    • Setting up Midleware use Limiiter
    • Setting up Monggo Data sanitise for Auth Undefined
    • Handle the Cross site scripting use xss-clean
    • Sending jwt to cookie
    • Handle Brute force & DDoS attackt with hpp and helmet
  • More MongoDB data Modeling

    • Modeling Location (Geospatial Data)
    • Populate Data user in Tours Model (guides)
    • Modeling Query Object references
    • Populate data Query Object
  • Nested Routes

    • Merge Routes
    • Nested Routed
  • Advanced Postman Setting

    • Setting up postman for API Usefull
    • Make Documentation of API with Postman
  • Use Template Engine

    • Setting up template with pug
    • Setting up base template and Content
  • Use Mapbox

    • Populate Coordinate use Mapbox
    • Show the Coordinate in our Pages

natours's People

Contributors

ekhel avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.