Creating the API package
In this package, we will implement a multi-service system that will help us have more than one service to connect to multiple databases. Let’s see how our package.json
file should look for the api
package:
{
"name": "@web-creator/api",
"version": "1.0.0",
"main": "index.js",
"scripts": {
"build": "cross-env NODE_ENV=production npm-run-all clean compile webpack:production",
"build:dev": "cross-env NODE_ENV=development npm-run-all clean compile webpack:development",
"clean": "rm -rf ./dist",
"compile": "tsc",
"dev": "ts-node-dev src/index.ts",
"lint": "npm run --prefix ../../ lint",
"lint:fix": "npm run --prefix ../../ lint:fix",
"webpack:development": "webpack --config=../../webpack.config...