Skip to content

Commit

Permalink
Fix app structure for Docker
Browse files Browse the repository at this point in the history
  • Loading branch information
akelsch committed Jun 20, 2020
1 parent 43047af commit 72591f3
Show file tree
Hide file tree
Showing 12 changed files with 11 additions and 9 deletions.
4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
FROM node:14

ENV NODE_ENV=production

WORKDIR /usr/src/app

COPY package*.json ./
Expand All @@ -8,4 +10,4 @@ RUN npm install
COPY . .

EXPOSE 3000
CMD [ "node", "server.js" ]
CMD [ "npm", "start" ]
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions src/init.js → lib/init.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import axios from 'axios'

import connection from './database.js'
import Mapdata from './models/mapdata.js'
import './models/case.js'
import './models/option.js'
import Mapdata from './models/Mapdata.js'
import './models/Case.js'
import './models/Option.js'

// Quelle: https://npgeo-corona-npgeo-de.hub.arcgis.com/datasets/917fc37a709542548cc3be077a786c17_0
const url = 'https://services7.arcgis.com/mOBPykOjAyBO2ZKk/arcgis/rest/services/RKI_Landkreisdaten/FeatureServer/0/query?where=1%3D1&outFields=OBJECTID,BL_ID&outSR=4326&f=geojson'
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion src/routes/mapdata.js → lib/routes/mapdata.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { douglasPeucker, webMercator } from '../algorithms.js'
import Mapdata from '../models/mapdata.js'
import Mapdata from '../models/Mapdata.js'

import express from 'express'
import sequelize from 'sequelize'
Expand Down
File renamed without changes.
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
"version": "1.0.0",
"description": "",
"type": "module",
"main": "src/server.js",
"main": "./lib/app.js",
"scripts": {
"start": "node src/server.js",
"init": "node src/server.js init",
"watch": "nodemon src/server.js",
"start": "node lib/app.js",
"init": "node lib/app.js init",
"watch": "nodemon lib/app.js",
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
Expand Down

0 comments on commit 72591f3

Please sign in to comment.