mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-01-28 00:01:13 -05:00
22 lines
593 B
JavaScript
22 lines
593 B
JavaScript
const path = require('path');
|
|
require('dotenv').config({ path: path.resolve(__dirname, '../../.env') });
|
|
|
|
const createDebugger = require('debug');
|
|
const nodemon = require('nodemon');
|
|
const log = createDebugger('fcc:start:development');
|
|
|
|
nodemon({
|
|
ext: 'js json',
|
|
// --silent squashes an ELIFECYCLE error when the server exits
|
|
exec: 'pnpm run --silent babel-dev-server',
|
|
watch: path.resolve(__dirname, './server'),
|
|
spawn: true,
|
|
env: {
|
|
DEBUG: `fcc*,${process.env.DEBUG}`
|
|
}
|
|
});
|
|
|
|
nodemon.on('restart', function nodemonRestart(files) {
|
|
log('App restarted due to: ', files);
|
|
});
|