Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export async function main() {
await createConnection();
const user = new User();
user.email = 'john@foalts.org';
await user.setPassword('password');
const user2 = new User();
user2.email = 'mary@foalts.org';
await user2.setPassword('password2');
const permission = new Permission();
permission.name = 'Admin permission';
permission.codeName = 'admin';
user.userPermissions = [ permission ];
console.log(
async function main() {
await createConnection(require('../ormconfig.json'));
const app = createApp(AppController);
const httpServer = http.createServer(app);
const port = Config.get('port', 3001);
httpServer.listen(port, () => {
console.log(`Listening on port ${port}...`);
});
}