Skip to content

LasseStaus/CPHworkshop_backend

Repository files navigation

Exam-project - VærkstedetCPH Backend

Table of Contents
  1. Project Description
  2. Getting Started
  3. Connecting to the frontend repo

Project Description

This repo is the backeend part of an exam project at KEA, developed for CPH-Værkstedet.

It is a REST api developed with next, capable of handling authentication and crud operations through prisma to a PostgresQL database.

Built with

The technologies used to built this prototype are

Necessary packages include

Getting Started

To get a local copy of the project up and running, follow the steps below

Prerequisites

This project requires Node.js to run

If you do not have Node.js installed, install it from their website.

This project uses Docker to run and connection to the database

If you do not have a way to run docker in your OS, we recommend installing Docker Desktop.

This project uses Yarn as a package manage. To run the project smoothly, we recommend using yarn instead of npm.

If you do not have yarn installed, we recommend installing yarn through NPM

If you do not have npm installed, we recommend following this guide.

  • Install yarn globally through npm
    npm install -g yarn
  • Check the version of yarn after installation
    yarn --version

Installation

  1. Clone the repository through the terminal

    git clone https://github.com/LasseStaus/CPHworkshop_backend.git

    Alternatively you can download the zip file, and open it in your IDE.

  2. Install packages used in the project

    yarn install
  3. Copy the contents of .env.example into a .env file and either specify details or use the default settings

    If you wish to specify your own details, remember to update the database connection string in schema.prisma, located in the Prisma root folder.

  4. Restart / Start the database, run migrations and seeds.

     yarn db:dev:restart
  5. View the database locally

    yarn prisma studio
  6. Run the application in production

    yarn run build
    yarn start:prod
  7. Alternatively, run the application in development mode

    yarn start:dev
  8. Run run e2e tests locally

    yarn test:e2e

back to top

Connect to the frontend

To create and connect with an instance of our frontend, please go to the frontend repository and follow the steps in the Readme

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published