From ca49aad1535e7ca374dd54407b19f95441d3b0ba Mon Sep 17 00:00:00 2001 From: Saad Jutt Date: Mon, 15 Nov 2021 05:39:30 +0500 Subject: [PATCH] chore: readme updated --- README.md | 29 ++++++++++++++++++++++++----- api/package.json | 4 +++- 2 files changed, 27 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index c009b0e..9dd1780 100644 --- a/README.md +++ b/README.md @@ -10,9 +10,16 @@ One major benefit of using SASjs Server (alongside other components of the SASjs ## Configuration +Configuration is made in the `configuration` section of `package.json`: + +- Provide path to SAS9 executable. + ### Using dockers: -There is `.env.example` file present at root of the project. +There is `.env.example` file present at root of the project. [for Production] +There is `.env.example` file present at `./api` of the project. [for Development] +There is `.env.example` file present at `./web` of the project. [for Development] +Remember to provide enviornment variables. #### Development @@ -53,7 +60,8 @@ It will build following images if running first time: ##### API -There is `.env.example` file present at `./api` directory. +Navigate to `./api` +There is `.env.example` file present at `./api` directory. Remember to provide enviornment variables else default values will be used mentioned in `.env.example` files Command to install and run api server. ``` @@ -63,7 +71,8 @@ npm start ##### Web -There is `.env.example` file present at `./web` directory. +Navigate to `./web` +There is `.env.example` file present at `./web` directory. Remember to provide enviornment variables else default values will be used mentioned in `.env.example` files Command to install and run api server. ``` @@ -73,9 +82,9 @@ npm start #### Development (running only api server and have web build served): -##### API +##### API server also serving Web build files -There is `.env.example` file present at `./api` directory. +There is `.env.example` file present at `./api` directory. Remember to provide enviornment variables else default values will be used mentioned in `.env.example` files Command to install and run api server. ``` @@ -83,6 +92,16 @@ cd ./web && npm i && npm build && cd ../ cd ./api && npm i && npm start ``` +#### Production + +##### API & WEB + +``` +npm run server +``` + +This will install/build `web` and install `api`, then start prod server. + ## Executables Command to generate executables diff --git a/api/package.json b/api/package.json index 34d050a..017fb1c 100644 --- a/api/package.json +++ b/api/package.json @@ -26,7 +26,9 @@ "./web/build/**/*" ], "targets": [ - "node16-macos-x64" + "node16-linux-x64", + "node16-macos-x64", + "node16-win-x64" ], "outputPath": "../executables" },