- Node.JS + Cluster
- TypeScript
- Express
- SCSS
npm install -g gulp
npm install
cd client-libs
npm install
npm run start
npm run start-prod
Run client Storybook tests: npm run storybook
Run server tests: npm run test-server
npm run build-client-dev
npm run build-client
npm run dev-client
npm run format-code
Open two terminal windows, in one, start development server with:
npm run start
In another, start rebuilding client files on change:
npm run dev-client
Now open your app in a browser and start developing. The app will automatically refresh on any changes.
- Build production client files with:
npm run build-client
- Start the app in production mode with:
npm run start-prod
. You can for example use PM2, in order to run it continuously.
All client libraries are located in client-libs
.
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 that they can be reused in other applications easily.