import fastify from 'fastify'; // see axios doc on how to use it import axios from 'axios'; const app = fastify({ logger: true }); app.post('/', async (req, res) => { return { message: `Welcome to Node Babel with ${ req.body?.testValue ?? 'no testValue' }`, }; }); // Only used for dev server, do not remove app.head('/', () => ({ ping: 'pong' })); // Run the server! const start = async () => { try { await app.listen(5000); } catch (err) { app.log.error(err); process.exit(1); } }; start();