mirror of
https://github.com/trambarhq/relaks-wordpress-example.git
synced 2025-09-02 12:42:38 +02:00
Reworked code to allow use of basePath other than / (issue #20).
Throwing error properly in JSON retrieval code (issue #44).
This commit is contained in:
@@ -9,8 +9,8 @@ const CACHE_SIZE = 500;
|
||||
const HTML_TEMPLATE = `${__dirname}/client/index.html`;
|
||||
|
||||
async function generate(path, target) {
|
||||
// retrieve cached JSON through Nginx
|
||||
console.log(`Regenerating page: ${path}`);
|
||||
// retrieve cached JSON through Nginx
|
||||
let host = NGINX_HOST;
|
||||
// create a fetch() that remembers the URLs used
|
||||
let sourceURLs = [];
|
||||
@@ -42,4 +42,5 @@ async function prefetch(path) {
|
||||
module.exports = {
|
||||
generate,
|
||||
prefetch,
|
||||
basePath: FrontEnd.basePath
|
||||
};
|
||||
|
Reference in New Issue
Block a user