From 7bd0fcec185e2ed4517d2ac9902ef7dd35fd54d3 Mon Sep 17 00:00:00 2001 From: Oleksandr Lopatnov Date: Mon, 15 Jun 2020 00:38:11 +0300 Subject: [PATCH] Update readme --- README.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/README.md b/README.md index 37f4c89..3d6564c 100644 --- a/README.md +++ b/README.md @@ -99,6 +99,20 @@ directory: ./scripts The `proxy` variable intended for request redirect to 3rd-party server and getting result of this response. +#### Connect API to front-end project + +```json +{ + "port": 4200, + "folders": "www", + "proxy": { + "/api": "localhost:8000" + } +} +``` + +This configuration means that the server will serve static files from a local `www` directory on 4200 port with remote API on . When the web-site makes request to "/api" path, the request will redirect to remote server with address. + ## Rights and Agreements License [Apache-2.0](https://github.com/lopatnov/static-server-express/blob/master/LICENSE)