4 Commits

Author SHA1 Message Date
dependabot[bot]
ff87c107c6 Bump express-handlebars from 4.0.6 to 5.3.1
Bumps [express-handlebars](https://github.com/express-handlebars/express-handlebars) from 4.0.6 to 5.3.1.
- [Release notes](https://github.com/express-handlebars/express-handlebars/releases)
- [Changelog](https://github.com/express-handlebars/express-handlebars/blob/master/CHANGELOG.md)
- [Commits](https://github.com/express-handlebars/express-handlebars/compare/v4.0.6...v5.3.1)

---
updated-dependencies:
- dependency-name: express-handlebars
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-11 04:43:40 +00:00
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
5 changed files with 9477 additions and 54 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.

9506
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -25,7 +25,7 @@
"dotenv": "^6.1.0",
"express": "^4.13.3",
"express-graphql": "^0.6.12",
"express-handlebars": "^4.0.4",
"express-handlebars": "^5.3.1",
"googleapis": "^39.1.0",
"graphql": "^0.13.2",
"morgan": "^1.8.0",

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()