Welcome to the Website Backend API repository! This project provides the backend functionality for a dynamic website, developed using Node.js, Express, and a selection of essential libraries. It's designed to handle authentication, data management, and various API endpoints to support your frontend application.
- Secure user authentication and password hashing using bcrypt.
- Efficient handling of cookies using cookie-parser.
- Cross-origin resource sharing (CORS) management for controlled data access.
- Environment variable configuration with dotenv for better security and flexibility.
- File upload support with express-fileupload.
- Session management using express-session for user persistence.
- JSON Web Token (JWT) authentication for API security.
- MySQL database connectivity and management using sequelize and mysql2.
- Node.js: Runtime environment for server-side JavaScript execution.
- Express: Fast, unopinionated, and minimalist web framework for Node.js.
- bcrypt: Hashing passwords for secure storage and authentication.
- cookie-parser: Parse HTTP request cookies for easy management.
- CORS: Cross-Origin Resource Sharing for controlled data access.
- dotenv: Load environment variables from a .env file.
- express-fileupload: Handle file uploads with ease.
- express-session: Session management for user persistence.
- JSON Web Token (JWT): Secure authentication method for transmitting information between parties.
- mysql2: MySQL database connectivity for Node.js applications.
- sequelize: Promise-based Node.js ORM for MySQL database management.
- Clone this repository to your local machine.
- Navigate to the project directory:
cd backend-api
. - Install the required dependencies:
npm install
. - Set up your MySQL database configuration in
config/config.json
. - Configure environment variables in a
.env
file. - Implement your routes and controllers in the
routes
andcontrollers
directories. - Run the server:
npm start
. - The API will be accessible at:
http://localhost:3000
.
Contributions are welcome! Feel free to open a pull request or an issue if you find any bugs or want to suggest improvements.
This project is licensed under the [MIT License].
Developed by Wanda Azhar