Skip to content

Example of ElysiaJS API using Prisma and Typescript

Notifications You must be signed in to change notification settings

naufaldi/note-be

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 - A web framework for building APIs
  • Prisma - A modern database toolkit
  • Swagger - API documentation

Getting Started

Prerequisites

  • Node.js (version 14 or higher)
  • npm or yarn
  • A PostgreSQL or MySQL database

Installation

  1. Clone the repository:

    git clone https://github.com/naufaldi/note-be.git
    cd note-be
  2. Install dependencies:

    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:

    npx prisma migrate dev
  5. Start the server:

    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!

About

Example of ElysiaJS API using Prisma and Typescript

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published