-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.js
42 lines (42 loc) · 1.54 KB
/
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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
//
// import AutoLoad from '@fastify/autoload'
// import Sensible from '@fastify/sensible'
// import Env from '@fastify/env'
// //import Cors from '@fastify/cors'
// //import UnderPressure from '@fastify/under-pressure'
// import S from 'fluent-json-schema'
// import { join } from 'desm'
//
//
// export default async function (fastify, opts) {
// // It's very common to pass secrets and configuration
// // to your application via environment variables.
// // The `fastify-env` plugin will expose those configuration
// // under `fastify.config` and validate those at startup.
// // TO FIX
// await fastify.register(Env, {
// schema: S.object()
// //.prop('NODE_ENV', S.string().required())
// //.prop('GITHUB_APP_ID', S.string().required())
// //.prop('GITHUB_APP_SECRET', S.string().required())
// //.prop('COOKIE_SECRET', S.string().required())
// //.prop('ALLOWED_USERS', S.string().required())
// .valueOf()
// })
//
// // Sensible adds many small utilities, such as nice http errors.
// await fastify.register(Sensible)
//
// // Autoload loads all the content from the specified folder, even the sub folders.
// await fastify.register(AutoLoad, {
// dir: join(import.meta.url, 'plugins'),
// options: Object.assign({}, opts)
// })
//
// await fastify.register(AutoLoad, {
// dir: join(import.meta.url, 'routes'),
// dirNameRoutePrefix: false,
// options: Object.assign({}, opts)
// })
//
// }