Skip to content
/ natours Public

NodeJS project for booking travel tours in the US. Uses PUG templates, Mongoose for interacting with MongoDB and Express.

Notifications You must be signed in to change notification settings

fdeboo/natours

Repository files navigation

Natours Application

Visit the deployed application here

Built using the following main technologies:

NodeJS Express MongoDB Pug

Dependencies

axios @babel/polyfill Bcryptjs Compression Cookie-parser Cors Dotenv Express Express-mongo-sanitize Express-rate-limit Helmet Hpp jwt Multer ndb Mongoose Nodemailer Pug Sharp Slugify Stripe Validator Xss-clean

Image handling

  • Sharp

    The typical use case for this high speed Node.js module is to convert large images in common formats to smaller, web-friendly JPEG, PNG, WebP and AVIF images of varying dimensions.

Security Middleware

  • Helmet

    Helmet helps you secure your Express apps by setting various HTTP headers. It is a Connect-style middleware, which is compatible with frameworks like Express. The top-level helmet function is a wrapper around 15 smaller middlewares, 11 of which are enabled by default.

  • xss-clean

    Node.js Connect middleware to sanitize user input coming from POST body, GET queries, and url params. Works with Express, Restify, or any other Connect app.

  • cors

    Provides a Connect/Express middleware that can be used to enable CORS with various options.

  • express-mongo-sanitize

    Middleware which sanitizes user-supplied data to prevent MongoDB Operator Injection.

  • express-rate-limit

    Basic rate-limiting middleware for Express. Limits repeated requests to public APIs and/or endpoints such as password reset.

  • compression

    Middleware that compresses text responses. It will attempt to compress response bodies for all request that traverse through the middleware, based on the given options

  • cookie-parser

    Parse Cookie header and populate req.cookies with an object keyed by the cookie names.

  • hpp

    Express middleware to protect against HTTP Parameter Pollution attacks

Data Modelling

  • bcryptjs

    A library to help you hash passwords.

  • validator

    A library of validators and sanitizers for strings only

  • slugify

    A Javascript package that turns a string into a url slug.

Frontend

  • pug

    A template engine for Node and for the browser. It compiles to HTML but has a simplified syntax. It makes it easy to render data pulled from a database or API

    It compiles the Pug source code into a JavaScript function that takes a data object (called “locals”) as an argument. Call that resultant function with your data, and returns a string of HTML rendered with your data.

Other

  • jsonwebtoken

    The most common scenario for using JWT is Authorization. Once the user is logged in, each subsequent request will include the JWT, allowing the user to access routes, services, and resources that are permitted with that token. Single Sign On is a feature that widely uses JWT nowadays, because of its small overhead and its ability to be easily used across different domains.

  • Stripe

    payment processing API for e-commerce websites and mobile applications.

  • Multer

    Multer is a node.js middleware for handling multipart/form-data, which is primarily used for uploading file inputs.

  • Dotenv

    A zero-dependency module that loads environment variables from a .env file into process.env

  • Axios (requests from front end to backend api)

    Promise based HTTP client for the browser and node.js

  • Nodemailer (sending basic emails)

    Nodemailer is a module for Node.js applications to allow easy as cake email sending. The project got started back in 2010 when there was no sane option to send email messages, today it is the solution most Node.js users turn to by default.

  • ndb

    Node Debugger is a debugging environment enabled by Chrome DevTools

  • @babel/polyfill

    Provides polyfills necessary for a full ES2015+ environment

Acknowledgements

This project was authored by Jonas Schmedtmann and taught as part of Node.js, Express, MongoDB & More: The Complete Bootcamp 2021 on Udemy

About

NodeJS project for booking travel tours in the US. Uses PUG templates, Mongoose for interacting with MongoDB and Express.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages