A simple Notes API built with Elysia and Prisma. This API allows users to create, read, update, and delete notes. It also includes authentication features and API documentation.
- Create, read, update, and delete notes
- User authentication
- API documentation available at
/docs
- Elysia - A web framework for building APIs
- Prisma - A modern database toolkit
- Swagger - API documentation
- Node.js (version 14 or higher)
- npm or yarn
- A PostgreSQL or MySQL database
-
Clone the repository:
git clone https://github.com/naufaldi/note-be.git cd note-be
-
Install dependencies:
bun install
-
Set up your environment variables: Create a
.env
file in the root directory and add your database connection string and any other necessary environment variables. -
Run database migrations:
npx prisma migrate dev
-
Start the server:
bun run start
- GET /notes - Retrieve all notes
- GET /notes/:id - Retrieve a note by ID
- POST /notes - Create a new note
- PUT /notes/:id - Update a note by ID
- DELETE /notes/:id - Delete a note by ID
API documentation is available at /docs
after starting the server.
Contributions are welcome! Please open an issue or submit a pull request.
This project is licensed under the MIT License
- Thanks to the Elysia and Prisma teams for their amazing frameworks!