diff --git a/docs/running.md b/docs/running.md index 55382ee..51ee4f6 100644 --- a/docs/running.md +++ b/docs/running.md @@ -38,3 +38,5 @@ Note: All commands entered need to be performed from within *this directory*. ``` 8. Open Google Chrome or Mozilla Firefox and navigate to `http://localhost:3000/` to access the app. + +### Alternatively - you can use [docker](https://github.com/zalox/docker-images/tree/master/Texd) diff --git a/public/views/modals/imageuploader.html b/public/views/modals/imageuploader.html index ca5a1db..20cfb59 100644 --- a/public/views/modals/imageuploader.html +++ b/public/views/modals/imageuploader.html @@ -2,7 +2,7 @@ -

Images

+

Uploaded images

diff --git a/public/views/modals/pluginuploader.html b/public/views/modals/pluginuploader.html index 5107c71..556340e 100644 --- a/public/views/modals/pluginuploader.html +++ b/public/views/modals/pluginuploader.html @@ -1,11 +1,11 @@ -

Last opp plugin

+

Upload plugin

- + diff --git a/server.ts b/server.ts index e055fa0..f0127da 100644 --- a/server.ts +++ b/server.ts @@ -34,6 +34,7 @@ var documentRoutes = require('./server/resources/document'); var indexroutes = require('./server/resources/index') var wsPort: number = process.env.PORT || 3001; +var wsIp: string = process.env.IP || 'localhost'; var databaseUrl: string = 'localhost'; var httpPort = 3000; @@ -133,9 +134,13 @@ app.get('/documents/:documentid/:chapterIndex', (req, res) => { }) app.get('/wsip', (req, res) => { - publicIp.v4((err, ip) => { - res.jsonp({ ip: ip, httpPort: httpPort, wsPort: wsPort }) - }); + if(!process.env.prod) { + publicIp.v4((err, ip) => { + res.jsonp({ ip: ip, httpPort: httpPort, wsPort: wsPort }); + }); + } else { + res.jsonp({ ip: wsIp, httpPort: httpPort, wsPort: wsPort }); + } }) app.get('/*', indexroutes.index); diff --git a/server/services/documentService.ts b/server/services/documentService.ts index 048807b..c705f1d 100644 --- a/server/services/documentService.ts +++ b/server/services/documentService.ts @@ -217,7 +217,7 @@ export class DocumentService { lines[fromLine]._raw = beginning + diff.text[0] + end; } else { lines[fromLine]._raw = beginning + diff.text[0]; - for (var i = 1; i < diff.text.length - 1; i++) { + for (let i: any = 1; i < diff.text.length - 1; i++) { lines.splice(fromLine + i, 0, { _raw: diff.text[i], _metadata: [] }) } lines.splice(toLine + diff.text.length - 1, 0, { _raw: diff.text[diff.text.length - 1] + end, _metadata: [] }) @@ -225,7 +225,7 @@ export class DocumentService { } else if (fromLine != toLine) { lines.splice(fromLine + 1, (toLine - fromLine)); lines[fromLine]._raw = beginning + diff.text[0]; - for (var i = 1; i < diff.text.length - 1; i++) { + for (let i: any; i < diff.text.length - 1; i++) { lines.splice(i, 0, { _raw: diff.text[i], _metadata: [] }) } if (diff.text.length != 1) { diff --git a/tsconfig.json b/tsconfig.json index 594d254..fe05d06 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -6,7 +6,7 @@ "sourceMap": true, "emitDecoratorMetadata": true, "experimentalDecorators": true, - "watch": true + "watch": false }, "filesGlob": [ "./server.ts",