mirror of
https://github.com/janishutz/libreevent.git
synced 2025-11-25 13:24:24 +00:00
add testing of new method of start page
This commit is contained in:
2
notes.md
2
notes.md
@@ -2,6 +2,8 @@
|
|||||||
|
|
||||||
- Load all orders of customer from db when selecting tickets and save to memory to check if ticket count has been exceeded or not.
|
- Load all orders of customer from db when selecting tickets and save to memory to check if ticket count has been exceeded or not.
|
||||||
|
|
||||||
|
- fix ticket counting
|
||||||
|
|
||||||
|
|
||||||
- Update files to import when deploying for included json files instead of secret.json files
|
- Update files to import when deploying for included json files instead of secret.json files
|
||||||
|
|
||||||
|
|||||||
@@ -47,6 +47,19 @@ To do this run the following command when starting libreevent:
|
|||||||
console.log( '[ Server ] loading settings' );
|
console.log( '[ Server ] loading settings' );
|
||||||
const settings = JSON.parse( fs.readFileSync( path.join( __dirname + '/config/settings.config.json' ) ) );
|
const settings = JSON.parse( fs.readFileSync( path.join( __dirname + '/config/settings.config.json' ) ) );
|
||||||
|
|
||||||
|
|
||||||
|
// Route for static html file for start page (page is compiled using
|
||||||
|
// Vue SSR and gets its support files (e.g. CSS and JS files) from
|
||||||
|
// the /home/supportFiles/:file route plus its assets from the /otherAssets/:file
|
||||||
|
// route).
|
||||||
|
|
||||||
|
app.get( '/', ( req, res ) => {
|
||||||
|
res.sendFile( path.join( __dirname + '/ui/home/active/en/index.html' ) );
|
||||||
|
} );
|
||||||
|
|
||||||
|
|
||||||
|
// Set up static routes for static file serving (performance wise not
|
||||||
|
// that good, but way easier to set up)
|
||||||
console.log( '[ Server ] Setting up static routes' );
|
console.log( '[ Server ] Setting up static routes' );
|
||||||
if ( settings.init ) {
|
if ( settings.init ) {
|
||||||
app.use( express.static( 'webapp/main/dist' ) );
|
app.use( express.static( 'webapp/main/dist' ) );
|
||||||
@@ -84,6 +97,8 @@ if ( settings.init ) {
|
|||||||
file = path.join( __dirname + '/webapp/setup/dist/index.html' );
|
file = path.join( __dirname + '/webapp/setup/dist/index.html' );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// handling of any unknown route. Returns the SPA index.html file which
|
||||||
|
// initiates loading of the SPA
|
||||||
app.use( ( request, response ) => {
|
app.use( ( request, response ) => {
|
||||||
response.sendFile( file );
|
response.sendFile( file );
|
||||||
} );
|
} );
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
{}
|
{"db":{"libreevent_temp":{},"libreevent_admin":{},"libreevent_orders":{},"libreevent_users":{}},"index":{"libreevent_temp":0,"libreevent_admin":0,"libreevent_orders":0,"libreevent_users":0}}
|
||||||
11
src/server/ui/home/active/en/index.html
Normal file
11
src/server/ui/home/active/en/index.html
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>Document</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<h1>Test</h1>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
Reference in New Issue
Block a user