Skip to content

Commit 530efa5

Browse files
authored
fix(secured api key): use a node sandbox (#364)
* initial try * simplify * same for vue * angular + react * update port in readme * fix port
1 parent 71710ff commit 530efa5

File tree

7 files changed

+20
-7
lines changed

7 files changed

+20
-7
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"template": "node",
3+
"container": { "port": 3000, "startScript": "start" }
4+
}

InstantSearch.js/secured-api-keys/README.md

-2
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,13 @@ To run this project locally, install the dependencies and run the local server:
99
```sh
1010
npm install
1111
npm start
12-
node server.js
1312
```
1413

1514
Alternatively, you may use [Yarn](https://http://yarnpkg.com/):
1615

1716
```sh
1817
yarn
1918
yarn start
20-
node server.js
2119
```
2220

2321
Open http://localhost:8080 to see your app.

InstantSearch.js/secured-api-keys/package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
"version": "1.0.0",
44
"private": true,
55
"scripts": {
6-
"start": "parcel index.html --port 3000",
6+
"dev": "parcel index.html --port 3000",
7+
"start": "npm run build && node server.js",
78
"build": "parcel build index.html",
89
"lint": "eslint .",
910
"lint:fix": "npm run lint -- --fix"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"template": "node",
3+
"container": { "port": 8080, "startScript": "start" }
4+
}

React InstantSearch/secured-api-keys/README.md

+2-4
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,12 @@ To run this project locally, install the dependencies and run the local server:
88

99
```sh
1010
npm install
11-
npm build
12-
node server.js
11+
npm run server
1312
```
1413

1514
Alternatively, you may use [Yarn](https://http://yarnpkg.com/):
1615

1716
```sh
1817
yarn
19-
yarn build
20-
node server.js
18+
yarn server
2119
```
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"template": "node",
3+
"container": { "port": 8080, "startScript": "server" }
4+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"template": "node",
3+
"container": { "port": 8080, "startScript": "start" }
4+
}

0 commit comments

Comments
 (0)