Skip to content

Instantly share code, notes, and snippets.

@catalinpit
Created May 26, 2021 12:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save catalinpit/e63824b86d13a736fd8efa6cccadde15 to your computer and use it in GitHub Desktop.
Save catalinpit/e63824b86d13a736fd8efa6cccadde15 to your computer and use it in GitHub Desktop.
const app = require('fastify')({ logger: true });
require('dotenv').config();
app.register(require('./src/routes/routes'));
app.listen(process.env.PORT, (err, addr) => {
if (err) {
app.log.error(err);
process.exit(1);
}
app.log.info(`Your server is listening on port ${process.env.PORT} 🧨`);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment