Indonesian Food Recipes is an API that provides access to 13,503 data entries of Indonesian food recipes that I obtained from Kaggle. This allows developers to fetch data related to Indonesian food for their projects.
This API is built using Elysia with the Bun runtime. It uses MySQL as the database, with Prisma as the ORM.
To run this project, you will need to add the following environment variables to your .env file:
DATABASE_URL = "mysql://<username>:<password>@localhost:3306/food_recipes"
PORT = "8080"
JWT_SECRET = "Your_JWT_Secret"
JWT Secret can be generated by using the following command:
node -e "console.log(require('crypto').randomBytes(32).toString('hex'))"
Clone the project
git clone https://github.com/ricotandrio/indonesian-food-recipes.git
Go to the project directory
cd indonesian-food-recipes
Install dependencies
bun install
Migrate database
bunx prisma migrate dev --name init
Start the server
bun run dev
Use http://localhost:8080/api/v1/ as the base URL and check http://localhost:8080/api/v1/swagger for API documentation.
To initialize your database with food recipes data, please run tests with the following command:
bun test