[ABANDONDED] Set of "apps" for the Flexor social network.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
436 B

5 years ago
  1. import { resolve } from 'path'
  2. import fastify from 'fastify'
  3. import fastifyStatic from 'fastify-static'
  4. const port = 8082
  5. const server = fastify({
  6. logger: {
  7. level: 'info',
  8. prettyPrint: true,
  9. }
  10. })
  11. server.register(fastifyStatic, {
  12. root: resolve(__dirname, '..', 'apps'),
  13. })
  14. const start = async () => {
  15. try {
  16. await server.listen(port)
  17. } catch (err) {
  18. process.exit(1)
  19. }
  20. }
  21. start()