-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#38: WiP, close to first contentBase fetch and rendering. Make fetch …
…client-side to view it better.
- Loading branch information
Showing
18 changed files
with
148 additions
and
381 deletions.
There are no files selected for viewing
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,25 @@ | ||
export const appName = "com.enonic.nextpoc.hmdb"; // <-- appName in hmdb/gradle.properties | ||
export const appNameUnderscored = appName.replace(/\./g, '_'); | ||
export const appNameDashed = appName.replace(/\./g, '-'); | ||
export const project = 'hmdb'; // <-- project identifier in path, e.g. 'default' in the URL <domain>/site/default/master | ||
export const appKey = "com.enonic.nextpoc.hmdb"; // <-- full app key = appName in hmdb/gradle.properties | ||
|
||
export const appNameUnderscored = appKey.replace(/\./g, '_'); | ||
export const appNameDashed = appKey.replace(/\./g, '-'); | ||
|
||
export const apiDomain = "http://localhost:8080"; | ||
|
||
export const apiServiceRoot = `_/service`; | ||
export const apiServiceName = 'sitecontent'; | ||
export const apiContentBase = '_contentbase'; | ||
export const apiContentFull = '_content'; | ||
|
||
export const siteRootUrlMaster = `${apiDomain}/site/${project}/master`; | ||
export const siteRootUrlDraft = `${apiDomain}/site/${project}/draft`; | ||
|
||
export const apiUrl = `${apiDomain}/${apiServiceRoot}/${appName}/${apiServiceName}`; | ||
// appName is the content _name of the root site content-item: | ||
export const contentApiUrlGetters = { | ||
master: { | ||
base: (appName) => `${siteRootUrlMaster}/${appName}/${apiContentBase}`, | ||
full: (appName) => `${siteRootUrlMaster}/${appName}/${apiContentFull}` | ||
}, | ||
draft: { | ||
base: (appName) => `${siteRootUrlDraft}/draft/${appName}/${apiContentBase}`, | ||
full: (appName) => `${siteRootUrlDraft}/draft/${appName}/${apiContentFull}` | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export default function Custom404() { | ||
return <h1>404 - Page Not Found</h1> | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
// pages/500.js | ||
export default function Custom500({message}) { | ||
return <> | ||
<h1>500 - Server-side error occurred</h1> | ||
{message && <p>{message}</p>} | ||
</> | ||
} |
Oops, something went wrong.