This repo houses backend and frontend for blogging application
- GET
/blogs
- Retrieves recently created blogs - POST
/blog
- Creates a new blog - GET
/blogs/:id
- Retrieves blog by id
-
The server is running with nodemon which will automatically restart for you when you modify and save a file.
-
The database used is SQLite, which will store data in a file local to your repository called
database.sqlite3
. The ORM Sequelize is on top of it. -
The BACKEND server is running on port 3001.
src/routes
contains all the routes or path of the applicationsrc/controllers
contains all the controllers attached to paths are places insrc/services
contains independent functions to perform different actions on DB or get data from DBtests/unit
contains unit tests for all servicestests/integration
cantains all the controller level or API integration tests
- Go to backend directory
cd backend/
- Run tests โ
npm run test
- Setup and start the backend application
โถ๏ธ
npm run seed
npm run start
- Open Postman
- Import
postman_collection.json
from this repo to test out the post analytics service - Import
blogging.postman_collection.json
from this repo to test out the mock stock trading service - Run all the request to test out all applications
- Import
/
- Home page og blogger website/blogs
- Alternate to home page/blogs/:id
- Open full blog/create
- Create a new blog
src/components
contains all the UI componentssrc/services
contains independent functions to perform different backend API calls
- Go to backend directory
cd frontend/
- Start the frontend application
โถ๏ธ
npm run start
- Frontend is hosted at http://localhost:3000/
- List all the blogs on homepage
- Click on specific blog to view full blog
- "Create a new blog" button to create a new blog