1
0
Fork 0

wip(backend): Work on OpenAPI v3 spec and swagger docs

This commit is contained in:
joostdecock 2022-12-18 20:04:52 +01:00
parent 86cf8787e5
commit 0cdb7a0ae0
14 changed files with 283 additions and 11 deletions

View file

@ -5,11 +5,11 @@ import { banner } from '../../../scripts/banner.mjs'
import dotenv from 'dotenv'
dotenv.config()
//const DBURL = process.env.BACKEND_DB_URL || 'file://./db.sqlite'
const newDb = () => {
// Say hi
console.log(banner + '\n')
const db = process.env.BACKEND_DB_URL.slice(6)
console.log(db)
const db = process.env.BACKEND_DB_URL ? process.env.BACKEND_DB_URL.slice(6) : './db.sqlite'
const schema = path.resolve('./prisma/schema.sqlite')
try {
if (fs.existsSync(db)) {