I am working on a boiler plate for a typescript based express server. One of my key requirements is to have eslint running with nodemon. In my package.json i have...
"scripts": {
"start": "node dist/index.js",
"dev": "nodemon src/index.ts --exec 'eslint . --ext .ts'",
"build": "tsc -p ."
},
my express app is pretty simple at this point...
import express from 'express';
import { PORT } from './config/constants';
const app = express();
app.use(express.json());
app.get('/api-v1', (req, res) => {
const test = 3;
console.log(test);
res.send('Hello World');
});
app.listen(PORT, () => {
console.log(`Server is listening on port ${PORT}`);
});
so when I run the dev script "nodemon src/index.ts --exec 'eslint . --ext .ts'"
the linting runs, however the express server is never started...I see this in the console:
[nodemon] clean exit - waiting for changes before restart
any thoughts on how to fix this?