Skip to content

Commit 18680b0

Browse files
committed
Initial import
This is little more than a proof of concept for a javascript template. It allows you to write an app.js file which should require express, launch it, and to which you can add calls.
0 parents  commit 18680b0

File tree

3 files changed

+42
-0
lines changed

3 files changed

+42
-0
lines changed

Dockerfile

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
FROM node:7.1.0-alpine
2+
3+
MAINTAINER Aad Versteden <madnificent@gmail.com>
4+
5+
ENV MU_SPARQL_ENDPOINT 'http://database:8890/sparql'
6+
ENV MU_APPLICATION_GRAPH 'http://mu.semte.ch/application'
7+
8+
WORKDIR /usr/src/app
9+
10+
COPY . /usr/src/app
11+
RUN ln -s /app/app.js /usr/src/app/
12+
RUN npm install
13+
14+
CMD sh start.sh
15+
16+
ONBUILD ADD . /app/
17+
ONBUILD RUN cd /usr/src/app && npm install

package.json

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"name": "mu-javascript-template",
3+
"version": "0.2.0",
4+
"description": "Template for mu services written in JavaScript",
5+
"scripts": {
6+
"dev": "nodemon server.js --watch src/ --exec babel-node",
7+
"start": "node app.js"
8+
},
9+
"repository": {
10+
"type": "git",
11+
"url": "git+https://github.com/mu-semtech/mu-javascript-template.git"
12+
},
13+
"keywords": [
14+
"mu-semtech"
15+
],
16+
"dependencies": {
17+
"express": "^4.14.0"
18+
},
19+
"author": "Aad Versteden <aad.versteden@gmail.com>",
20+
"license": "MIT",
21+
"homepage": "https://mu.semte.ch"
22+
}

start.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#! /bin/sh
2+
npm install
3+
NODE_PATH=/usr/src/app/node_modules:$NODE_PATH node app.js

0 commit comments

Comments
 (0)