mirror of
https://github.com/sergeyyarkov/node-docker-example.git
synced 2026-10-11 02:09:22 +03:00
17 lines
378 B
JavaScript
17 lines
378 B
JavaScript
import Application from '#app/server';
|
|
|
|
const app = new Application();
|
|
|
|
app.serve('public');
|
|
app.partials(process.cwd() + '/views/partials');
|
|
|
|
app.run().catch((error) => {
|
|
console.error('[ERR]: Error on startup the application.', error);
|
|
});
|
|
|
|
process.on('SIGINT', () => {
|
|
console.log(`[LOG]: Graceefully stopping the server...`);
|
|
app.server.close();
|
|
process.exit();
|
|
});
|