Skip to content

A contact form that takes data and stored in MongoDB Database

Notifications You must be signed in to change notification settings

5p7Ro0t/sitewithDB

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Form with ExpressJS and MongoDB

This is a Scholarship Form that takes data and stores in its database.

Website : http://scholarships.tk/

Prerequisite Downloads

Getting Started

At first, Run command in this repo directory to install required modules : npm install

You are good to go now. Run index.js file and go to http://localhost/ to visit your site.
You can always change your port in the index.js file :

const host = 'localhost';
const port = 80;

Retrieving Your data

  • Open Command Prompt or Terminal and Run Command : mongod. Leave it running
  • Open another Command Prompt or terminal and Run Command : mongo. You will see a shell.
  • In the shell , Run Command : use MyDB (As this is our default database).
  • Now Run Command : db.scholarships.find(). You will see the data :).

You can always change names of databases and collections in the index.js.
MongoDB Tutorial : here

Extra

I have hosted this website on Amazon AWS and used freenom domain for free :)

References

  • WebDev Tutorials - here
  • Hosting on AWS - here
  • Link domain to AWS - here

Thank You
Regards,
Kumar spandan Pattanayak