Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
async function main() {
const app = new TodoListApplication({
rest: {
host: '127.0.0.1',
port: 0,
},
});
await app.boot();
// use in-memory storage without filesystem persistence
app.bind('datasources.config.db').to({connector: 'memory'});
// overwrite the error logger to print all failed requests, including 4xx
app.bind(RestBindings.SequenceActions.LOG_ERROR).to(logAllErrors);
await app.start();
// Tell the master thread what is our URL
console.log('Server listening at', app.restServer.url);
if (process.send) {
process.send({url: app.restServer.url});
}
}
async function main() {
const app = new TodoListApplication({
rest: {
host: '127.0.0.1',
port: 0,
},
});
await app.boot();
// use in-memory storage without filesystem persistence
app.bind('datasources.config.db').to({connector: 'memory'});
// overwrite the error logger to print all failed requests, including 4xx
app.bind(RestBindings.SequenceActions.LOG_ERROR).to(logAllErrors);
await app.start();