For bot:
node dist/bot/server.js
For client:
npm run start
For server:
npm run server-dev
Summary : Add Typescript and reload server after code changes Create sample Express server Add TSLint Add Prettier Airbnb code styling Husky to prevent unformatted code commits
$ npm init $ npm i -D typescript ts-node-dev
$ $(npm bin)/tsc --init
... // "outFile": "./", "outDir": "./build" /_ Redirect output structure to the directory _/, // "rootDir": "./", ...
"scripts": { "build": "tsc", "start": "NODE_ENV=production node ./build/index.js", "dev": "ts-node-dev --respawn --transpileOnly ./src/index.ts", ... },
$ npm i -S express $ npm i -D @types/express
$ npm run dev
$ npm run build
$ npm start
TSLint checks TypeScript code for readability, maintainability, and functionality errors. Install the plugin: “TSLint” by Microsoft.
$ npm i -D tslint
create-react-app client
npm i cors --save
npm i body-parser --save
Morgan is basically a logger, on any requests being made, it generates logs automatically.
npm i morgan --save
npm install @types/morgan
npm install @types/cors