Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/naufaldi/note-be
Example of ElysiaJS API using Prisma and Typescript
https://github.com/naufaldi/note-be
api bun elysiajs open-api-2 open-source typescript
Last synced: 9 days ago
JSON representation
Example of ElysiaJS API using Prisma and Typescript
- Host: GitHub
- URL: https://github.com/naufaldi/note-be
- Owner: naufaldi
- Created: 2024-11-02T23:25:43.000Z (2 months ago)
- Default Branch: master
- Last Pushed: 2024-11-07T23:39:56.000Z (about 2 months ago)
- Last Synced: 2024-12-22T12:12:18.041Z (15 days ago)
- Topics: api, bun, elysiajs, open-api-2, open-source, typescript
- Language: TypeScript
- Homepage:
- Size: 14.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Elysia with Bun runtime
# Notes API
## Description
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.
## Features
- Create, read, update, and delete notes
- User authentication
- API documentation available at `/docs`## Technologies Used
- [Elysia](https://elysiajs.com/) - A web framework for building APIs
- [Prisma](https://www.prisma.io/) - A modern database toolkit
- [Swagger](https://swagger.io/) - API documentation## Getting Started
### Prerequisites
- Node.js (version 14 or higher)
- npm or yarn
- A PostgreSQL or MySQL database### Installation
1. Clone the repository:
```bash
git clone https://github.com/naufaldi/note-be.git
cd note-be
```2. Install dependencies:
```bash
bun install
```3. 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.4. Run database migrations:
```bash
npx prisma migrate dev
```5. Start the server:
```bash
bun run start
```### API Endpoints
- **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### Documentation
API documentation is available at `/docs` after starting the server.
## Contributing
Contributions are welcome! Please open an issue or submit a pull request.
## License
This project is licensed under the MIT License
## Acknowledgments
- Thanks to the Elysia and Prisma teams for their amazing frameworks!