MERN server templates are missing essential development scripts and nodemon configuration, making development workflow inefficient and inconsistent with modern Node.js practices.
Developer Experience: Essential scripts like start, dev, test should be included by default
Modern Workflow: Nodemon for auto-restart during development is industry standard
Consistency: Other templates have proper scripts, MERN should too
Productivity: Developers shouldn't manually configure basic development tools
Expected behaviour:
MERN server templates should include comprehensive npm scripts and nodemon configuration for smooth development.
Actual behaviour:
Currently, MERN server files only have:
"scripts": {
"test": "echo "Error: no test specified" && exit 1"
}
Example scenarios:
Run npx celtrix my-app→ choose MERN + JavaScript
Navigate to my-app/server/
Should be able to run npm run dev for development
Should be able to run npm start for production
Nodemon should auto-restart on file changes
Environment:
Node.js: v18+
npm: v8+
OS: Cross-platform
Proposed Implementation
Updated package.json scripts should include:
"scripts": {
"start": "node server.js",
"dev": "nodemon server.js",
"test": "jest",
"build": "echo 'Build completed'",
"lint": "eslint .",
"lint:fix": "eslint . --fix"
}
New nodemon.json configuration:
{
"watch": ["*.js", "controllers/", "models/", "routes/", "middleware/"],
"ext": "js,json",
"ignore": ["node_modules/", "tests/"],
"delay": "1000"
}
Files to create/modify:
templates/mern/javascript/server/
│── package.json # Update scripts only
│── nodemon.json # New file for nodemon config
templates/mern/typescript/server/
│── package.json # Update scripts only
│── nodemon.json # New file for nodemon config
TypeScript specific scripts:
"scripts": {
"start": "node server.js",
"dev": "nodemon server.js",
"test": "echo "Error: no test specified" && exit 1"
}
I'd love to take on this issue
MERN server templates are missing essential development scripts and nodemon configuration, making development workflow inefficient and inconsistent with modern Node.js practices.
Developer Experience: Essential scripts like start, dev, test should be included by default
Modern Workflow: Nodemon for auto-restart during development is industry standard
Consistency: Other templates have proper scripts, MERN should too
Productivity: Developers shouldn't manually configure basic development tools
Expected behaviour:
MERN server templates should include comprehensive npm scripts and nodemon configuration for smooth development.
Actual behaviour:
Currently, MERN server files only have:
"scripts": {
"test": "echo "Error: no test specified" && exit 1"
}
Example scenarios:
Run npx celtrix my-app→ choose MERN + JavaScript
Navigate to my-app/server/
Should be able to run npm run dev for development
Should be able to run npm start for production
Nodemon should auto-restart on file changes
Environment:
Node.js: v18+
npm: v8+
OS: Cross-platform
Proposed Implementation
Updated package.json scripts should include:
"scripts": {
"start": "node server.js",
"dev": "nodemon server.js",
"test": "jest",
"build": "echo 'Build completed'",
"lint": "eslint .",
"lint:fix": "eslint . --fix"
}
New nodemon.json configuration:
{
"watch": ["*.js", "controllers/", "models/", "routes/", "middleware/"],
"ext": "js,json",
"ignore": ["node_modules/", "tests/"],
"delay": "1000"
}
Files to create/modify:
templates/mern/javascript/server/
│── package.json # Update scripts only
│── nodemon.json # New file for nodemon config
templates/mern/typescript/server/
│── package.json # Update scripts only
│── nodemon.json # New file for nodemon config
TypeScript specific scripts:
"scripts": {
"start": "node server.js",
"dev": "nodemon server.js",
"test": "echo "Error: no test specified" && exit 1"
}
I'd love to take on this issue