mirror of
https://github.com/bellingcat/datasheet-server.git
synced 2026-06-09 20:08:32 +03:00
Compare commits
3 Commits
project/ye
...
develop
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a6337e9cba | ||
|
|
18b20356b5 | ||
|
|
75cb1a43cf |
@@ -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
9478
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user