This is a full-featured API for managing news articles, categories, and users. The backend is built using Node.js, Express.js, Sequelize ORM, and MySQL database. The API supports CRUD operations and image uploads for news and user profiles.
- User authentication (login and register)
- CRUD operations for news articles
- CRUD operations for categories
- CRUD operations for users
- Image uploads for news and user profiles
- Node.js
- npm/yarn
- MySQL database
-
Clone the repository:
git clone https://github.com/M-Julius/4News-Backend.git cd 4News-Backend
-
Install dependencies:
npm install
or
yarn install
-
Set up the database:
npx sequelize-cli db:create npx sequelize-cli db:migrate
Change a config.json
file in the config directory and add the following environment variables:
{
"username": "root",
"password": null,
"database": "dbname",
"host": "127.0.0.1",
"dialect": "mysql"
}