mirror of
https://github.com/sergeyyarkov/educt-server.git
synced 2026-10-11 18:29:15 +03:00
26 lines
819 B
TypeScript
26 lines
819 B
TypeScript
/*
|
|
|--------------------------------------------------------------------------
|
|
| AdonisJs Server
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
| The contents in this file is meant to bootstrap the AdonisJs application
|
|
| and start the HTTP server to accept incoming connections. You must avoid
|
|
| making this file dirty and instead make use of `lifecycle hooks` provided
|
|
| by AdonisJs service providers for custom code.
|
|
|
|
|
*/
|
|
|
|
import 'reflect-metadata';
|
|
import sourceMapSupport from 'source-map-support';
|
|
import { Ignitor } from '@adonisjs/core/build/standalone';
|
|
|
|
sourceMapSupport.install({ handleUncaughtExceptions: false });
|
|
|
|
const server = new Ignitor(__dirname).httpServer();
|
|
|
|
server.start().catch(error => {
|
|
throw new Error(error);
|
|
});
|
|
|
|
process.on('SIGINT', () => server.kill(10));
|