Vending Machine API Development

Mikhail

Mikhail Wahib

Vending Machine API

Description

This is an API for a vending machine built using NodeJS, Express, TypeScript and SQLite3 with Prisma ORM.

Install

make sure you have node, pnpm or npm, and sqlite3 installed.
Clone the repository
git clone https://github.com/MikhailWahib/vending-machine-api
Navigate to the folder
cd vending-machine-api
Install dependencies
pnpm install

Environment Setup

create .env file
copy .env.example content to .env and fill the required vars
cp .env.example .env

Database Setup

pnpx prisma migrate dev --name init

Run

Run dev server
pnpm run dev

Build

Build
pnpm run build
Start server
pnpm run start

Testing

Setup

create .env.test file
copy .env.test.example content to .env.test and fill the required vars
cp .env.test.example .env.test

Run tests

pnpm test
Like this project

Posted May 1, 2025

Developed a vending machine API using NodeJS, Express, TypeScript, and SQLite3.