EventHive is a web application for managing events and user accounts.
This Node.js API provides functionality for managing events and user accounts. It is built on the Express framework for routing and handling HTTP requests. The API includes endpoints for creating, retrieving, updating, and deleting events, as well as user registration and authentication.
This project is hosted on an AWS EC2 instance and can be accessed via the following URL: EventHive on AWS EC2
EventHive uses Cloudinary for managing and serving images. Cloudinary is a cloud-based image and video management service that offers features for uploading, storing, transforming, and delivering media assets. To enable Cloudinary image deployment, configure the required environment variable:
CLOUDINARY_URL
: Your Cloudinary URL containing API key, secret, and cloud name.
EventHive is seamlessly integrated with Cloudinary for efficient image management and delivery.
To begin using this project, follow these steps:
-
Clone this repository to your local machine.
-
Install the required dependencies using
npm install
oryarn install
. -
Configure environment variables for your application, including database connection details and any other sensitive information.
-
Start the application with
npm start
oryarn start
. -
Access the API at the deployed AWS EC2 URL.
The project is structured as follows:
-
GET "/events/"
: Retrieve all events. -
GET "events/:eventId"
: Retrieve a specific event. -
POST "/events/category"
: Get the category of an event. -
Middleware:
.use(authMiddleware)
. Authentication is required for the routes below. -
GET "/events/my-events"
: Retrieve events created by the user. -
POST "/events/"
: Create a new event. -
DELETE "/events/:eventId"
: Users can delete events they have created. -
PUT "/events/:eventId"
: Users can update events they have created. -
POST "/users/signup"
: User registration. -
POST "/users/login"
: User login to obtain an authentication token.
Ensure you have installed the necessary dependencies using npm install
or yarn install
. The key dependencies include:
- Express: A minimal and flexible Node.js web application framework.
- Multer: Middleware for handling file uploads (used for event images).
Make sure to set up the required environment variables for your project. Common environment variables include:
DB_CONNECTION
: Database connection string.JWT_SECRET
: Secret key for JSON Web Tokens.PORT
: The port on which the server should listen.
You are encouraged to contribute to this project by creating issues or pull requests. Your input and suggestions for improvement are highly appreciated.
This project is licensed under the MIT License. Refer to the LICENSE file for more details.