forked from fr/deguapp
Backend: code formatted
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import * as shell from 'shelljs';
|
||||
import * as shell from "shelljs";
|
||||
|
||||
// Copy all the view templates
|
||||
//shell.cp('-R', 'src/views', 'dist/')
|
||||
shell.cp('-R', 'src/public', 'dist/');
|
||||
shell.cp('-u', 'src/.env', 'dist/');
|
||||
shell.cp("-R", "src/public", "dist/");
|
||||
shell.cp("-u", "src/.env", "dist/");
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
const mongoose = require('mongoose');
|
||||
const { MongoMemoryServer } = require('mongodb-memory-server');
|
||||
const mongoose = require("mongoose");
|
||||
const { MongoMemoryServer } = require("mongodb-memory-server");
|
||||
|
||||
let mongo: any = null;
|
||||
|
||||
const connectDB = async () => {
|
||||
mongo = await MongoMemoryServer.create({ binary: { os: { os: 'linux', dist: 'ubuntu', release: '18.04' } } }); // TODO: check that host OS is Void Linux, else remove the argument
|
||||
mongo = await MongoMemoryServer.create({ binary: { os: { os: "linux", dist: "ubuntu", release: "18.04" } } }); // TODO: check that host OS is Void Linux, else remove the argument
|
||||
const uri = mongo.getUri();
|
||||
|
||||
await mongoose.connect(uri);
|
||||
@@ -27,4 +27,4 @@ const dropCollections = async () => {
|
||||
}
|
||||
};
|
||||
|
||||
export { connectDB, dropDB, dropCollections };
|
||||
export { connectDB, dropDB, dropCollections };
|
||||
|
||||
Reference in New Issue
Block a user