Skip to content

Commit

Permalink
Improved resolvePathRelativeToWwwroot support
Browse files Browse the repository at this point in the history
  • Loading branch information
soyarsauce committed Aug 26, 2020
1 parent 3d8dda3 commit f2aa63e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
3 changes: 3 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
### Next version
* [The next feature]

### 3.3.1
* Improved support with `resolvePathRelativeToWwwroot` triggering `serveWwwRoot`

### 3.3.0

* Added option to configure post limit on `share` endpoint (see `shareMaxRequestSize` in `serverconfig.json.example`)
Expand Down
3 changes: 2 additions & 1 deletion lib/makeserver.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,8 @@ module.exports = function(options) {
}

// Serve the bulk of our application as a static web directory.
var serveWwwRoot = exists(options.wwwroot + '/index.html');
var serveWwwRoot = exists(options.wwwroot + '/index.html')
|| (options.settings.singlePageRouting && exists(options.wwwroot + options.settings.singlePageRouting.resolvePathRelativeToWwwroot));
if (serveWwwRoot) {
app.use(express.static(options.wwwroot));
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "terriajs-server",
"version": "3.3.0",
"version": "3.3.1",
"description": "NodeJS server for TerriaJS, consisting of a CORS proxy, proj4 CRS lookup service, ogr2ogr conversion service, and express static server.",
"engineStrict": true,
"engines": {
Expand Down

0 comments on commit f2aa63e

Please sign in to comment.