Skip to content

Instantly share code, notes, and snippets.

@junaid1460
Created August 17, 2019 11:22
Show Gist options
  • Save junaid1460/fdc0f1f0b76bd42620f592c0ff43fd5c to your computer and use it in GitHub Desktop.
Save junaid1460/fdc0f1f0b76bd42620f592c0ff43fd5c to your computer and use it in GitHub Desktop.
export const hapiServer = new Server({
host: env.APP_HOST,
port: env.APP_PORT,
routes: { cors: true },
});
(async () => {
await hapiServer.route(new ApiModule().getRoutes());
await hapiServer.route(new ApiModuleForAdmin().getRoutes());
await hapiServer.route(new AdminModule().getRoutes());
await hapiServer.start();
})()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment