Wet Bat

This projects was built with NextJS and Prisma as an ORM.

Project structure

.
├── components
│   ├── ...
├── pages
│   ├── api
│   │   ├── quotes // REST API for quotes
│   ├── quotes
│   │   ├── [id].tsx // edit quotes
|   ├── _app.tsx
├── prisma
│   ├── migrations // migrations for the database
│   ├── schema.prisma // database schema
|   ├── ...
...

Getting Started

Prerequisites

  • NodeJS
  • Yarn or NPM

Installation

  1. Clone the repo
    git clone https://github.com/eliabefranca/wet-bat
  2. Enter the project folder
    cd wet-bat
  3. Install NPM packages
    yarn install
  4. Create .env file
    cp .env.example .env

Running the project

  1. Setting up the database
    yarn prisma migrate dev --name init
  2. Running the project
    yarn dev

Building the project

  1. Building the project
    yarn build
  2. Running the project
    yarn start

Using docker-compose to run the project

  1. Running the project
    docker-compose up