Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function startServer(dist, port) {
server = serve(dist, {
silent: true,
port,
ignore: ['node_modules']
});
}
async preview(inputConfig?: PhenomicInputConfig) {
try {
const config = await normalizeConfiguration(inputConfig);
await build(config);
log(
`⚡️ Serving on http://localhost:${config.port}` +
config.baseUrl.pathname,
);
serve(config.outdir, {
port: config.port,
});
} catch (e) {
handleError(e);
}
},
};