Fake-X-Backend is the backend of a full space-x starlink tracker
https://github.com/jakeschultz89
https://github.com/brandonhall96
https://github.com/vinnyvilasboa
https://github.com/behemoth0132
- Run mongoDB
- Run your server
- ✨Magic ✨
- Use the seed .js file to add the static data we included in order to view it in mongoDB
- The data used in the seed will reflect to the front end.
- The magic is just getting started please scroll to the end to see the link for the front end!
Fake-X uses a number of technologies to work properly:
- mongoDB - The database for modern applications
- Mongoose - an Object Data Modeling (ODM) library for MongoDB and Node. js
- node.js - evented I/O for the backend
- Express - fast node.js network app framework
Fake-X requires Node.js to run.
You first need to clone the repository
git clone https://github.com/jakeschultz89/Project-3-Backend.git
Install the dependencies and devDependencies and start the server.
npm i
npm start
For .env... use whatever values you would like for the items included in the .env file below
MONGO_URI=""
JWT_SECRET=""
Next... Go to your terminal and
Run the command (mongod) first
Then follow up with the (mongo) command in a seperate terminal window
The above code snippet is something we are very proud of due to the fact that we went through alot of trial and error to get this to work. The purpose of the above function is to update a specific
astro
that has already been created, initially we used theupdate
method and that didnt work because it only updated the firstastro
in the database instead of the one we tried to pull and update by the i.d.. Once we changed it tofindByIDAndUpdate
it fixed all of our problems but we defninently had to troubleshoot this for a few days but thankfully with some needed help we got it to work.
Above is our thinking behind our schema's and how they connect the User schema is self explanitory it collects the information input by the user and saves it to the database, this schema connects to the
Astros Scehma
meaning a user can create an astro and conduct other things such as update and delete them. The other schemas are stactic data that we seeded into our databse from the Space-X-APIhttps://github.com/r-spacex/SpaceX-API/tree/master/docs/v4
Verify the deployment by navigating to your server address in your preferred browser.
http://localhost:8080
our backend is also deployed on heroku at
https://afternoon-lowlands-89410.herokuapp.com/
In order to see the full app please view our front end
https://github.com/brandonhall96/react-project-3
you will find additional information there concerning this app.