Move database config to env variables

This commit is contained in:
Dominik Korsa 2021-02-13 12:38:34 +01:00
parent b75a31a201
commit 36a93b10d1
No known key found for this signature in database
GPG key ID: 546F986F71A6FE6E
2 changed files with 3 additions and 4 deletions

View file

@ -1,5 +1,6 @@
import type { Connection } from 'typeorm';
import { createConnection } from 'typeorm';
import { requireEnv } from '../utils';
import Application from './entities/application';
import Client from './entities/client';
import Developer from './entities/developer';
@ -12,9 +13,8 @@ class Database {
public async connect(): Promise<void> {
this.connection = await createConnection({
type: 'mongodb',
host: 'localhost',
port: 27017,
database: 'wulkanowy-bridge-local',
url: requireEnv('DATABASE_URL'),
useNewUrlParser: true,
entities: [
Application,
User,

View file

@ -1 +0,0 @@
VUE_APP_CAPTCHA_SITE_KEY=6LfAxzUaAAAAANF5VLy39hbgx5K6WTQTa2YDdhmC