- Node.JS + Cluster
- TypeScript
- Express
- SCSS
npm install -g gulp
npm install
bower install
npm run start
npm run start-prod
Run all tests: npm run test-all
Run client tests: npm run test-client
Run server tests: npm run test-server
Client tests configuration is in karma.conf.js
gulp dev
gulp prod
gulp watch-ts-scss
gulp transpile-client-ts
gulp transpile-all-scss
Put all imports you want to use in gulpfile.js
. Then simply run gulp dev
or gulp prod
.
In development mode you will get all your imports as separate entries so they will be easy to debug.
In production mode all your imports will be put together and minified to single .js and .css file so that they are as small as possible and fast to load.
Both client and server consist of modular structure.
That means certain folder order:
src/
├── client/
│ ├── app/
│ └── elements/
│
└── server/
├── app/
└── elements/
Folders functions:
app
- Consist of main application, server or client. It basically wires all elements together.
elements
- Independent elements. It means that they don't depend on any other elements or application source code or assets. They can only depend on libraries used by project. It makes them independent from this project, which means they can be reused in other applications easily.