A full stack application where users can share their recent travel stories and view other users' stories.
View
·
Report Bug
·
Request Feature
Table of Contents
The app was made NodeJS. The front end uses Handlebars to build semantic templates which we display to the users with data sent from the controller. In the backend we used MongoDB for the database, and ExpressJS for creating the web application. For the user authentication, the Passport middleware was used with the addition of bcryptjs for securing and hashing all passwords.
The following environment variables are needed to run the application:
- Port where the server will be ran
PORT = 3000
- Your MongoDB connection string
MONGO_URI = INSERT URL
- The database name on wish the data will be stored
MONGO_DB = INSERT DATABASE NAME
- The session secret used to hash the session
SESSION_SECRET = INSERT RANDOM STRING
- Install NPM packages
npm install
- Start the development server
npm run dev
- Access server at https://localhost:5000
All user passwords are hashed using bcryptjs before storing them in the database. A relationship between the stories and users was added to prevent having to request data from the database multiple times. The application files are organized in their respective areas for easy change/addition in the future.
By building the full-stack application with MVC in mind, when something needs to be fixed or added, it is easy to find where you need to go to do so. For example, if I wanted to change something related to the stories, I know that the changes would need to be made in the stories route or view.