/Tims-express-server

Node.js, Passport, EJS, ExpressJS, and MongoDB web server. With fully functional authentication.

Primary LanguageJavaScript

This is a back-end node express web application. It has a fully working login/signup, password hashing, persistent storage, and 5 views. I created this while learning to build node.js server applications.

I used the following to create a node server with full authentication capabilities and persistent storage.

  • Passport - for sign-up/ log-in and oath.
  • EJS – templating language for rendering view to html.
  • ExpressJS - as the server framework.
  • MongoDB - This is the data base used for persistent storage and currently stores login credentials.

Prerequisites

Prerequisites Program installation

#####Linux

#####Windows

#####Mac OSX

Prerequisites Packages

npm install -g bower

If any prerequisites where missed please add it to the GitHub issues...

How to Run App

make sure node.js is installed on your system then run the following commands

Install all local node dependencies

npm install
bower install

Start MongoDB

MongoDB needs to be running before you start the node server.

Do the following in the command line interface to Run MongoDB

<MONGO_INSTALL_DIRECTORY>/bin/mongod --dbpath <PATH_TO_DB_DIRECTORY>

For example, if you installed your MongoDB in the following location: C:\Program Files\MongoDB\Server\3.2\bin and you want your data base information stored in this location: C:\data\db then you would enter the following into the command line.

C:/Program Files/MongoDB/Server/3.2/bin/mongod --dbpath C:/data/db

####Start the Node Server and view in Web Page in Browser.

On MacOS or Linux

DEBUG=myapp:* npm start

On Windows

set DEBUG=myapp:* & npm start

Then load http://localhost:3000/ in your browser to access the app.