mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-03-03 23:01:25 -05:00
19 lines
418 B
TypeScript
19 lines
418 B
TypeScript
import './instrument';
|
|
|
|
import { build, buildOptions } from './app';
|
|
import { HOST, PORT } from './utils/env';
|
|
|
|
const start = async () => {
|
|
const fastify = await build(buildOptions);
|
|
try {
|
|
const port = Number(PORT);
|
|
fastify.log.info(`Starting server on port ${port}`);
|
|
await fastify.listen({ port, host: HOST });
|
|
} catch (err) {
|
|
fastify.log.error(err);
|
|
process.exit(1);
|
|
}
|
|
};
|
|
|
|
void start();
|