This is the backend for the Crypto Milan application, which mimics the functionality of Luma. Admins can list events, and users can view event details.
- Admin can list events (protected endpoint)
- Users can view event details
- Event data stored in MongoDB
- Node.js
- MongoDB
-
Clone the repository:
git clone cd crypto-milan/backend
-
Install dependencies:
npm install express body-parser mongoose dotenv
-
Create a
.env
file in the root directory and add the following:MONGODB_URI=mongodb://localhost:27017/crypto-milan ADMIN_TOKEN=admin-token
-
Start the server:
npm start
GET /events
: Get all eventsGET /events/:id
: Get event by IDPOST /events
: Add a new event (protected)
To access protected endpoints, include the following header in your request:
Authorization: Bearer admin-token
This project is licensed under the MIT License.