Skip to content

Built a restfull api with CRUD operations using mongoDb and mongoose. Server side rendering via Pug template, encryption via bycrpt, demo payments via Stripe and authentication.

Notifications You must be signed in to change notification settings

ketankauntia/Natours-Backend

Repository files navigation

Natours-Backend

Built a restfull api with CRUD operations using mongoDb and mongoose. Server side rendering with Pug template and authentication added to data stored via encrypting it and checkout the tours with stripe payments.

  • To run, connect to the database cluster
  • Install all node modules using : npm i
  • Now start the project using : npm start

image

-login credentials :

admin@natours.io test1234

login screen : Screenshot (105)

To book a tour, select a tour, and go to the bottom of the tour and click on "BOOK TOUR NOW". It will be processed and you will be taken to stripe checkout,

dev card number : 4242 4242 4242 4242 [only this will work on development server]

image

after sucessfull booking, Go to account and check under bookings, the booking will be shown there :)

add config.env file to the project to run.

contains :

  • NODE_ENV = development

  • PORT=3000

  • DATABASE_PASSWORD =

  • DATABASE=

  • JWT_SECRET=

  • JWT_EXPIRES_IN=90d

  • JWT_COOKIE_EXPIRES_IN=90

  • EMAIL_USERNAME=

  • EMAIL_PASSWORD=

  • EMAIL_HOST=

  • EMAIL_PORT=

  • EMAIL_FROM=

  • SENDGRID_USERNAME=

  • SENDGRID_PASSWORD=

  • STRIPE_SECRECT_KEY=

--- x ----

-sendgrid wont work, don't try connecting, use another mailing provider for verification mails.

About

Built a restfull api with CRUD operations using mongoDb and mongoose. Server side rendering via Pug template, encryption via bycrpt, demo payments via Stripe and authentication.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published