This an API for blogging. It has features for posting and commenting blog posts, with Role Based Management System (RBMS).
- Manage posts
- Manage users and its roles
- User authentication and authorization
- [TODO] Like and comment posts
-
Open the destination folder where you want to clone the project.
-
Clone the repository:
git clone https://github.com/DavidEsdrs/eblog-api.git eblog-api
- Navigate to the eblog-api folder
cd eblog-api
Now, you have two options. The first and easiest way to getting started is through docker-compose
CLI:
4.1 Run docker compose in the root:
docker compose up
By doing that, it will start the needed services (mysql and app) for running the application.
4.2. If you choose running locally for development purposes, you must have Mysql installed in your machine
- Run the migrations:
npm run migration:run
// OR
yarn migration:run
- Once the migrations are set, run the application for development (watch mode):
npm run dev
// OR
yarn dev
- Or if you want to run the build version. Build it first:
npm run build
// OR
yarn build
7.1. A folder called "build" was created, run the script "server.js" inside it:
node build/server.js
- Enjoy! :D
The API Swagger Documentation is located at path "/api-docs".
Note: The documentation is currently under development