My second project within my coding cohort. This is a random fact generator, full stack application built by me. Here I am utilizing APIs, Fetch, ERDs, with programming languages such as Express, MongoDB, Liquid and Javascript.
Welcome to the Fun Fact Generator! Here's the place where you can get some interesting fun facts that you'll be able to use as great conversation starters whether by the office water cooler, on a date, or even waiting in the doctor's office. Enjoy this endless amount of fun facts and ease of use!
Here's the base URL for this API: https://api.aakhilv.me
- Fork and Clone this repository
- Cd into the
Project-2-Fun-Facts
directory - Run
npm install
to install the dependencies Touch .env .gitignore
in the main directory- Add
node_modules
and.env
into the.gitignore
folder. - Check if you have nodemon installed by running
npm install -g nodemon
- Run
nodemon
to start the server - Run 'https://localhost:3000'
- Signup or Login to create an account to continue through the app.
- Enjoy and Favorite some Fun Facts! :)
As a user, you should be able to use this full stack application to:
- Receive random facts from database schema
- Log in/Sign Up in order to have a user profile within the app
- Save random facts to profile in order to have them logged within my profile
- Ability to journal/create information that relates to that specific fact.
- Delete any favorite facts that are no longer needed.
- The ability to log out and return to the main homepage/Index
This will have elements of:
- RESTful Routes (i.e. GET, POST, PUT and DELETE )
- Utilize ODM to create a database table structure with MongoDB data
- Incoportate API
- Have models
Facts and Journals Routes
VERB | PATTERN | ACTION | DESCRIPTION | MODEL |
---|---|---|---|---|
GET | /facts | Index | Indexes with singular Fun Fact | Facts |
GET | /facts/faves | Show | Shows User's fact they've favorited | Facts |
DELETE | /:id | Delete | Deletes a User's specific fact they've favorited | Facts |
----------- | ----------- | ----------- | ----------- | ----------- |
GET | /journals | Index | Shows all users Journal entries | Journals |
POST | /journals | Create | Shows User's journaled 'fact' they've favorited | Journals |
GET | /:id/edit | Edit | Edit your specific journal entry | Journals |
PUT | /journals | Update | Shows the users updated Journal entry | Journals |
DELETE | /:id | Delete | Deletes the users selected Journal entry | Facts |