https://github.com/linneasandberg/photoapi-backend
Development of a REST API with Authentication for a Future Photo Application Backend.
https://github.com/linneasandberg/photoapi-backend
prisma rest-api typescript
Last synced: about 1 year ago
JSON representation
Development of a REST API with Authentication for a Future Photo Application Backend.
- Host: GitHub
- URL: https://github.com/linneasandberg/photoapi-backend
- Owner: LinneaSandberg
- Created: 2024-08-23T15:49:37.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-08-23T15:51:29.000Z (almost 2 years ago)
- Last Synced: 2025-02-12T04:16:14.709Z (over 1 year ago)
- Topics: prisma, rest-api, typescript
- Language: TypeScript
- Homepage:
- Size: 75.2 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[](https://classroom.github.com/a/3quacgcd)
# FED23 API-utveckling Prisma Boilerplate
This is a starter template/boilerplate for a TypeScript Node.js REST API using Express, Prisma and Express-validator.
## Usage
Clone this repository, create an `.env` file and copy the contents from `.env.example`. Create a new MySQL-database and change the database-name in `DATABASE_URL` after the last slash to the name of your database.
Don't forget to change the DEBUG prefix in `package.json` to your own project name.
Run `npm install` to install all packages and then start the server using `npm run dev`.
## Build
Run `npm run build` to transpile TypeScript into JavaScript. This will create a `build` folder with the transpiled code, which can be run using `npm start`. The `build` folder is ignored by git. The script also runs `npx prisma migrate deploy` to deploy the database schema to the database, as well as `npx prisma db seed` to seed the database with some initial data (if you have any seed data in `prisma/seed.ts`).