Skip to content

Commit e40089b

Browse files
author
Cijin Cherian
authored
Merge pull request #384 from ggwadera/docker-npm
Use npm to start app inside the container
2 parents 0046d31 + 2ebce08 commit e40089b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ app.get('/', (req, res) => {
107107
app.listen(process.env.PORT || 8123);
108108
```
109109

110-
7. Update the `main` field in `package.json` with the filename of your app entry point: `"main": "app.js"`
110+
7. Update the `scripts` section in `package.json` with your app entry point command, under `start`: `"start": "node app.js"`
111111
8. Run `git add .`
112112
9. Run `git commit -m "Initial Commit"`
113113
10. Run `git push origin master`

src/helpers/docker.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ const createContainer = async (
6666
]
6767
}
6868
},
69-
Cmd: ['node', '.']
69+
Cmd: ['npm', 'run', 'start']
7070
})
7171
.then(container => container.id)
7272
.catch(err => err)

0 commit comments

Comments
 (0)