Welcome to the Restaurant API This API allows you to manage your virtual tavern seamlessly with AdonisJS 5 and TypeScript, featuring robust table management functionalities. For development, we utilize SQLite3, while MySQL is used for production. Additionally, the API is designed with Test-Driven Development (TDD) options to ensure reliable and maintainable code.
- Table Management: Manage tables, reservations, and seating arrangements effortlessly.
- TypeScript: Enjoy type safety and modern JavaScript features.
- AdonisJS 5: Leverage the power of AdonisJS, a fully-featured Node.js framework.
- SQLite3 for Development: Lightweight and easy-to-use database for local development.
- MySQL for Production: Reliable and scalable database solution for production.
- TDD: Implement Test-Driven Development for robust testing capabilities.
- Languages: TypeScript
- Framework: AdonisJS 5
- Databases: SQLite3 (development), MySQL (production)
- Testing: TDD
- Node.js
- npm or yarn
- SQLite3 (for development)
- MySQL (for production)
-
Clone the repository:
git clone https://github.com/malldonado/api-restaurante.git cd api-restaurante/roleplay-api
-
Install dependencies:
npm install # or yarn install
-
Set up the environment variables:
Create a
.env
file in the root directory and add the following variables:NODE_ENV=development APP_KEY=your_app_key DB_CONNECTION=sqlite SQLITE_FILENAME=./db.sqlite3 MYSQL_HOST=127.0.0.1 MYSQL_PORT=3306 MYSQL_USER=root MYSQL_PASSWORD=your_mysql_password MYSQL_DB_NAME=restaurant
-
Run migrations:
node ace migration:run
Start the AdonisJS development server:
npm run dev
# or
yarn dev
The server will start on http://localhost:3333.
To run tests, use the following command:
npm run test
# or
yarn test
This project is licensed under the MIT License. See the LICENSE file for details.
- AdonisJS
- TypeScript
- SQLite
- MySQL
This README.md provides a comprehensive overview of the API, including instructions for installation, configuration, execution, and testing, as well as details about the functionalities and the technological stack used in the project.