Skip to content

A dynamic website using pug templates with a backend made in nodejs(Expressjs) consisting of authorization, emailing, user-roles, review-system and a booking system (Payments using stripe).

Notifications You must be signed in to change notification settings

karmanya007/Natours

Repository files navigation

Natourify

A dynamic website using pug templates with a backend made in nodejs(Expressjs) consisting of authorization, emailing, user-roles, review-system and a booking system (Payments using stripe). Deployed version


homepage


Installation

Requirements

You will need Nodejs, MongoDB, Mailtrap account(For dev e-mailing), Sendgrid Account(For production e-mailing) and Stripe Accont

Setup

  1. Clone this repository.

    git clone https://github.com/karmanya007/Natours.git
  2. Make config.env file and put the following variables:

    NODE_ENV=development
    PORT=3000
    DATABASE=<Your mongodb connection string>
    DATABASE_LOCAL=mongodb:https://localhost:27017/shortify
    DATABASE_PASSWORD=<Your database connection password>
    
    JWT_SECTET=<Your secret JWT private key (Try to keep it atleast 32 character long)>
    JWT_EXPIRES_IN=90d
    JWT_COOKIE_EXPIRES_IN=90
    
    EMAIL_USERNAME=<Mailtrap email username>
    EMAIL_PASSWORD=<Mailtrap email password>
    EMAIL_HOST=smtp.mailtrap.io
    EMAIL_PORT=25
    
    EMAIL_FROM=<Your email>
    
    SENDGRID_USERNAME=apikey
    SENDGRID_PASSWORD=<Sendgrid password>
    
    STRIPE_SECRET_KEY=<Stripe secret key>
    STRIPE_WEBHOOK_SECRET=<Stripe secret key for webhooks>
  3. Open this directory in the terminal and run:

    npm install
    npm run dev
  4. For building the bundle for frontend JS files run

     npm run watch:js
     OR
     npm run build:js
    
  5. Visit http:https://localhost:3000/

Usage

😄ENJOY😄

About

A dynamic website using pug templates with a backend made in nodejs(Expressjs) consisting of authorization, emailing, user-roles, review-system and a booking system (Payments using stripe).

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages