Skip to content

Commit 30af98e

Browse files
committed
Update README
1 parent 5fa65f8 commit 30af98e

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

README.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,8 @@ services:
6767
- /absolute/path/to/your/sources/:/app/
6868
```
6969
70+
Mounting the sources will automatically populate the local `node_modules` folder and will provide a package-lock.json (providing you don't opt out of the generation). This should provide enough initial support for editor hints.
71+
7072
### Build a microservice based on mu-javascript-template
7173
Requires:
7274
- a semantic.works stack, like mu-project
@@ -156,7 +158,7 @@ An example
156158
import bodyParser from 'body-parser';
157159
// ...
158160
159-
app.post("/delta-updates", bodyParser.json({ limit: '50mb' }), function(req, res) {
161+
app.post("/delta", bodyParser.json({ limit: '50mb' }), function(req, res) {
160162
//...
161163
}
162164
```
@@ -257,7 +259,6 @@ The following environment variables can be configured:
257259
- `ALLOW_MU_AUTH_SUDO`: Allow sudo queries when the service requests it.
258260
- `DEFAULT_MU_AUTH_SCOPE`: Default mu-auth-scope to use for calls.
259261

260-
261262
#### Mounting `/config`
262263
You may let users extend the microservice with code.
263264

@@ -275,5 +276,13 @@ The verbosity of logging can be configured through following environment variabl
275276

276277
Following values are considered true: [`"true"`, `"TRUE"`, `"1"`].
277278

279+
### Code hints
280+
The template will automatically supply a `node_modules` folder for code hints when the microservice runs in development and the sources are mounted in `/app`. You may need to restart the language server so these are picked up.
281+
282+
Use the mu-script `setup-ide` to install these without running in development mode.
283+
284+
### Package lock
285+
Changes to dependencies in `package.json` will be picked up and an updated `package-lock.json` will be copied into the mounted sources provided `package-lock.json` is enabled. Local packages are installed through the `package-lock.json` and the template's dependencies are merged in. The `package-lock.json` thus only contains your own dependencies and should not conflict with future upgrades in the template.
286+
278287
### Custom build commands
279288
To execute custom bash statements during the image build (e.g. to install aditional system libraries), provide an `on-build.sh` script in the root of your service. It will be automatically picked up and executed by the Docker build.

0 commit comments

Comments
 (0)