This is the back-end for Sun Voyage (pronounced like 'Bon Voyage'), a decoupled fullstack app.
sun-voyage.herokuapp.com
Welcome to Sun Voyage! Visit planets and dwarf planets in the Solar System to learn more about each, and to see what your age and weight would be in a different world. Interact with other galactic travelers by sharing your experiences and sight-seeing recommendations in the comments of each planet!
Click here to visit the live site.
Click here to visit the live backend.
And click here to view the client github repo.
You don't need an account to view planets and others' comments, but you will need one to add your own and to update your profile.
- Node.js (v15.5.1)
- Express
- Passport/Bcrypt - Authentication and password hashing
- JWT - Create user tokens
- Key APIs:
- Le Soleil System - To seed database with planet information
- Mongoose - Retrieivng and modifying database data
- MongoDB Atlas - Database to store data
If you'd like to set up this project on your local server:
- Fork and clone this repository
- Run
npm ito install the dependencies listed in package.json- Run
npm i nodemon(if not already globally installed)
- Run
- Create an .env file, and add values to the below variables:
DB_CONNECTION_STRINGfor the link to your local or online mongo database.mongodb://localhost/<nameOfDatabase>will create a database with that name if it doesn't already exist.JWT_SECRETto be any string that you'd like
- Run the seeder file to populate your database with planets:
node seeder/seeder.js - To view your mongo database (assuming that you already have mongo installed):
brew services start mongodb-community@4.4mongoto enter the shellshow dbsuse <nameOfDB>show collectionsdb.<nameOfCollection>,find().pretty()to view all values in that collectionquit()to exit the shell
- Run
nodemonto start the server in port 8000 or a port of your choice
b = backend functionalty; f = frontend functionality.
user = generic user; User = logged in user.
| On... | We created/implemented the following... |
|---|---|
| Fri, 2/19/21 |
|
| Sat, 2/20/21 |
|
| Mon, 2/22/21 |
|
| Tues, 2/23/21 |
|
| Wed, 2/24/21 |
|
| Thurs, 2/25/21 |
|
| Fri, 2/26/21 |
|