Project Structure \ Main commands \ Linter Usage
├── Kilogram # Express.js app
│ └── app.js # App entry point
│ └── routes.js # App routing resolver
│ └── api # Express route controllers for all the endpoints of the app
│ └── config # Environment variables and configuration related stuff
│ └── jobs # Jobs definitions for agenda.js
│ └── loaders # Split the startup process into modules
│ └── models # Database models
│ └── services # All the business logic is here
│ └── subsribers # Event handlers for async task
├── README.md # README file
├── static # Folder for static files (css, js, images and etc)
└── templates # Folder for html templates
We are using npm scripts to run our app, so...
To run application in debug mode use
npm run startd
To run application in production mode use
npm run start
To run linters use
npm run lint
To print stylelint errors, use:
npx stylelint "**/*.css"
To integrate stylelint in Webstorm:
- Go to Preference → Languages and Frameworks → Style Sheets → Stylelint
- Check enable checkbox
To print eslint problems, use:
npx eslint .
To fix eslint problems, use:
npx eslint --fix .
To integrate eslint in Webstorm:
- Go to Preferences → Languages & Frameworks → JavaScript → Code Quality Tools → ESLint
- Check Automatic ESLint configuration
- Check Run eslint --fix on save