File tree Expand file tree Collapse file tree 3 files changed +8
-5
lines changed
Expand file tree Collapse file tree 3 files changed +8
-5
lines changed Original file line number Diff line number Diff line change 11node_modules /
22db /
3+ lib /
Original file line number Diff line number Diff line change @@ -11,4 +11,7 @@ RUN npm install
1111# Copy application files
1212COPY . /app
1313
14- CMD ["npm" , "start" ]
14+ # Precompile javascript
15+ RUN ./node_modules/.bin/babel src --out-dir lib
16+
17+ CMD ["node" , "lib/index.js" ]
Original file line number Diff line number Diff line change 44 "description" : " Experts REST backend" ,
55 "main" : " index.js" ,
66 "scripts" : {
7- "start" : " node lib/index.js" ,
8- "debug" : " node index.js" ,
7+ "start" : " node index.js" ,
98 "db:start" : " node util/db/start" ,
109 "db:stop" : " docker stop expertsdb" ,
1110 "db:rm" : " docker rm expertsdb" ,
12- "test" : " eslint src/ && node test/index.js | tap-spec" ,
13- "postinstall" : " babel src --out-dir lib"
11+ "test" : " eslint src/ && node test/index.js | tap-spec"
1412 },
1513 "keywords" : [
1614 " rest" ,
2826 },
2927 "homepage" : " https://github.com/yamalight/building-products-with-js#readme" ,
3028 "devDependencies" : {
29+ "babel-cli" : " ^6.11.4" ,
3130 "babel-core" : " ^6.11.4" ,
3231 "babel-eslint" : " ^6.1.2" ,
3332 "babel-preset-es2015-node" : " ^6.1.0" ,
You can’t perform that action at this time.
0 commit comments