Yield generated for 4ab8929e-abbe-41e5-addd-0d822abb58df
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.
 

24 lines
447 B

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