3 Commits

Author SHA1 Message Date
Lachlan Kermode
a6337e9cba Use npm in Dockerfile rather than yarn 2022-01-15 01:48:55 -05:00
Lachlan Kermode
18b20356b5 Update source data to point to live URLs 2021-10-22 12:15:11 -04:00
Lachlan Kermode
75cb1a43cf Fix/package lock; better example data (#79)
* Update package-lock.json

* Update caniuse-lite

* Update XLSX data to be more descriptive of timemap's features
2021-10-21 17:36:19 +02:00
4 changed files with 9462 additions and 39 deletions

View File

@@ -4,12 +4,12 @@ LABEL authors="Lachlan Kermode <lk@forensic-architecture.org>"
# Install app dependencies
COPY package.json /www/package.json
RUN cd /www; yarn
RUN cd /www; npm install
# Copy app source
COPY . /www
WORKDIR /www
RUN yarn build
RUN npm run build
RUN mkdir -p data
# set your port
@@ -17,4 +17,4 @@ ENV PORT 4040
EXPOSE 4040
# start command as per package.json
CMD ["yarn", "start"]
CMD ["npm", "start"]

Binary file not shown.

9478
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -1,7 +1,5 @@
import { version } from '../../package.json'
import fetch from 'node-fetch'
import { Router } from 'express'
import { getParameterByName } from '../lib/util'
import copy from '../copy/en'
export default ({ config, controller }) => {
@@ -24,21 +22,6 @@ export default ({ config, controller }) => {
})
})
api.get('/media/:code', (req, res) => {
const { code } = req.params
fetch(`${process.env.MEDIA_API_ENDPOINT}/${code}`, {
method: 'get',
headers: {
'Authorization': 'Basic ' + new Buffer(process.env.MEDIA_AUTH_USER + ":" + process.env.MEDIA_AUTH_PWORD).toString("base64")
}
})
.then(response => response.json())
.then(data => res.send(data))
.catch(err => {
res.status(err.status || 404).send({ error: err.message })
});
})
api.get('/update', (req, res) => {
controller
.update()