@maxpeterkaya/web-proxy 1.0.3 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/INSTALL-GUIDE.md +20 -7
- package/README.md +29 -6
- package/bin/install.js +1 -1
- package/package.json +3 -3
- package/renovate.json +3 -0
package/INSTALL-GUIDE.md
CHANGED
|
@@ -8,29 +8,42 @@ version through commands.
|
|
|
8
8
|
|
|
9
9
|
### Step 1
|
|
10
10
|
|
|
11
|
-
Install: ``npm i @maxpeterkaya/web-proxy
|
|
11
|
+
Install: ``npm i @maxpeterkaya/web-proxy``
|
|
12
12
|
|
|
13
13
|
While running ``npm i``, it will automatically download the latest binary with execution permissions.
|
|
14
14
|
|
|
15
|
-
Currently you need to run your app and web-proxy through concurrently to ensure both are running concurrently.
|
|
16
15
|
|
|
17
16
|
### Step 2
|
|
18
17
|
|
|
19
|
-
|
|
18
|
+
> You can run your web app either through web-proxy or concurrently. To run your app through web-proxy, pass the **-app
|
|
19
|
+
** argument.
|
|
20
|
+
|
|
21
|
+
Add the following scripts to your package.json to run your app through web-proxy:
|
|
20
22
|
|
|
21
23
|
```json
|
|
22
24
|
{
|
|
23
25
|
"scripts": {
|
|
24
|
-
"start:proxy": "./node_modules/.bin/web-proxy",
|
|
25
26
|
"start:web": "YOUR COMMAND TO START YOUR APP",
|
|
26
|
-
"start": "
|
|
27
|
+
"start": "npx web-proxy -app"
|
|
27
28
|
}
|
|
28
29
|
}
|
|
29
30
|
```
|
|
30
31
|
|
|
31
|
-
|
|
32
|
+
Add the following scripts to your package.json to run your app and web-proxy concurrently:
|
|
33
|
+
|
|
34
|
+
Install: ``npm i concurrently``
|
|
35
|
+
|
|
36
|
+
```json
|
|
37
|
+
{
|
|
38
|
+
"scripts": {
|
|
39
|
+
"start:proxy": "npx web-proxy",
|
|
40
|
+
"start:web": "YOUR COMMAND TO START YOUR APP",
|
|
41
|
+
"start": "concurrently --prefix none \"npm run start:web\" \"npm run start:proxy\""
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
```
|
|
32
45
|
|
|
33
|
-
|
|
46
|
+
> You can view the docs for concurrently [here](https://github.com/open-cli-tools/concurrently/tree/main/docs).
|
|
34
47
|
|
|
35
48
|
In the future web-proxy will be able to start your web app itself without the use of concurrently.
|
|
36
49
|
|
package/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Web-proxy
|
|
2
2
|
|
|
3
|
-
[](https://artifacthub.io/packages/search?repo=web-proxy)
|
|
4
|
-
|
|
3
|
+
[](https://artifacthub.io/packages/search?repo=web-proxy)   
|
|
4
|
+

|
|
5
5
|
## Introduction
|
|
6
6
|
|
|
7
7
|
This project aims to provide a better logging solution to web applications that lack structured logs.
|
|
@@ -12,11 +12,35 @@ Some of these frameworks may include:
|
|
|
12
12
|
- NextJS
|
|
13
13
|
- PrismaORM
|
|
14
14
|
|
|
15
|
-
##
|
|
15
|
+
## Getting Started
|
|
16
|
+
|
|
17
|
+
### NodeJS
|
|
18
|
+
|
|
19
|
+
Install: ``npm i @maxpeterkaya/web-proxy``
|
|
20
|
+
|
|
21
|
+
Add the following scripts to your ``package.json``:
|
|
22
|
+
|
|
23
|
+
```json
|
|
24
|
+
{
|
|
25
|
+
"scripts": {
|
|
26
|
+
"start": "npx web-proxy -app",
|
|
27
|
+
// Passing the -app is very important to tell web-proxy to run the web app for you.
|
|
28
|
+
"start:web": "YOUR COMMAND TO START THE WEB APP"
|
|
29
|
+
// This could be next start, remix-serve build, ng serve, node dist/main, etc.
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
After doing so, make sure web-proxy is properly configured
|
|
35
|
+
|
|
36
|
+
## [Installation Guide](https://vc.maxkaya.com/maxpeterkaya/web-proxy/src/branch/main/INSTALL-GUIDE.md)
|
|
16
37
|
|
|
17
38
|
## Examples
|
|
18
39
|
|
|
19
|
-
- [Container middleware](https://
|
|
40
|
+
- [Container middleware](https://vc.maxkaya.com/maxpeterkaya/web-proxy/src/branch/main/examples/container-middleware)
|
|
41
|
+
- [Static website](https://vc.maxkaya.com/maxpeterkaya/web-proxy/src/branch/main/examples/static-website)
|
|
42
|
+
- [Authentication](https://vc.maxkaya.com/maxpeterkaya/web-proxy/src/branch/main/examples/authentication)
|
|
43
|
+
- [Container proxy](https://vc.maxkaya.com/maxpeterkaya/web-proxy/src/branch/main/examples/container-proxy)
|
|
20
44
|
|
|
21
45
|
## Roadmap
|
|
22
46
|
|
|
@@ -28,5 +52,4 @@ These bullet points are in no particular order of importance or difficulty.
|
|
|
28
52
|
- Templates
|
|
29
53
|
- Screenshots
|
|
30
54
|
- Benchmarks
|
|
31
|
-
- Configurable logs
|
|
32
|
-
- NPM package
|
|
55
|
+
- Configurable logs
|
package/bin/install.js
CHANGED
|
@@ -24,7 +24,7 @@ if (!assetName) {
|
|
|
24
24
|
process.exit(1);
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
const url = `https://
|
|
27
|
+
const url = `https://vc.maxkaya.com/maxpeterkaya/changelog/releases/download/latest/web-proxy_${assetName}`;
|
|
28
28
|
const destDir = path.join(__dirname);
|
|
29
29
|
const destFile = path.join(destDir, `${platform === "win32" ? "web-proxy.exe" : "web-proxy"}`);
|
|
30
30
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@maxpeterkaya/web-proxy",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.4",
|
|
4
4
|
"description": "Server middleware enabling better logging for web apps through structured logs",
|
|
5
5
|
"bin": {
|
|
6
6
|
"web-proxy": "bin/run.js"
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
},
|
|
12
12
|
"repository": {
|
|
13
13
|
"type": "git",
|
|
14
|
-
"url": "https://
|
|
14
|
+
"url": "https://vc.maxkaya.com/maxpeterkaya/web-proxy"
|
|
15
15
|
},
|
|
16
16
|
"keywords": [
|
|
17
17
|
"nextjs",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"private": false,
|
|
29
29
|
"author": {
|
|
30
30
|
"name": "Max Kaya",
|
|
31
|
-
"email": "
|
|
31
|
+
"email": "git@maxkaya.com"
|
|
32
32
|
},
|
|
33
33
|
"license": "Apache-2.0"
|
|
34
34
|
}
|
package/renovate.json
ADDED