forked from anothersoft/hns-bridge
-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.js
24 lines (20 loc) · 696 Bytes
/
app.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
let fastify = require("fastify")({ logger: true });
const path = require("path");
const AutoLoad = require("fastify-autoload");
const config = require("./config.json");
// Place here your custom code!
// Do not touch the following lines
// This loads all plugins defined in plugins
// those should be support plugins that are reused
// through your application
fastify.register(AutoLoad, {
dir: path.join(__dirname, "plugins"),
options: Object.assign({}, {}),
});
// This loads all plugins defined in routes
// define your routes in one of these
fastify.register(AutoLoad, {
dir: path.join(__dirname, "routes"),
options: Object.assign({}, {}),
});
fastify.listen(config.port, "0.0.0.0");