change dir stucture
|
Before Width: | Height: | Size: 1.2 MiB After Width: | Height: | Size: 1.2 MiB |
|
Before Width: | Height: | Size: 320 KiB After Width: | Height: | Size: 320 KiB |
|
Before Width: | Height: | Size: 657 KiB After Width: | Height: | Size: 657 KiB |
9496
package-lock.json
generated
|
Before Width: | Height: | Size: 148 B After Width: | Height: | Size: 148 B |
|
Before Width: | Height: | Size: 125 B After Width: | Height: | Size: 125 B |
|
Before Width: | Height: | Size: 170 B After Width: | Height: | Size: 170 B |
|
Before Width: | Height: | Size: 140 B After Width: | Height: | Size: 140 B |
|
|
@ -10,5 +10,5 @@ export const DATA_DIR = `${BASE_DIR}/data`
|
||||||
export const UPLOAD_DIR = `${BASE_DIR}/data/uploads`
|
export const UPLOAD_DIR = `${BASE_DIR}/data/uploads`
|
||||||
export const UPLOAD_URL = `/uploads`
|
export const UPLOAD_URL = `/uploads`
|
||||||
export const COMMON_DIR = `${BASE_DIR}/common/`
|
export const COMMON_DIR = `${BASE_DIR}/common/`
|
||||||
export const GAME_DIR = `${BASE_DIR}/game/`
|
export const PUBLIC_DIR = `${BASE_DIR}/public/`
|
||||||
export const TEMPLATE_DIR = `${BASE_DIR}/game/templates`
|
export const TEMPLATE_DIR = `${BASE_DIR}/templates`
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@ import {
|
||||||
UPLOAD_DIR,
|
UPLOAD_DIR,
|
||||||
UPLOAD_URL,
|
UPLOAD_URL,
|
||||||
COMMON_DIR,
|
COMMON_DIR,
|
||||||
GAME_DIR,
|
PUBLIC_DIR,
|
||||||
TEMPLATE_DIR,
|
TEMPLATE_DIR,
|
||||||
} from './Dirs.js'
|
} from './Dirs.js'
|
||||||
import GameCommon from '../common/GameCommon.js'
|
import GameCommon from '../common/GameCommon.js'
|
||||||
|
|
@ -37,7 +37,7 @@ const storage = multer.diskStorage({
|
||||||
})
|
})
|
||||||
const upload = multer({storage}).single('file');
|
const upload = multer({storage}).single('file');
|
||||||
|
|
||||||
const statics = express.static(GAME_DIR)
|
const statics = express.static(PUBLIC_DIR)
|
||||||
|
|
||||||
const render = async (template, data) => {
|
const render = async (template, data) => {
|
||||||
const loader = new twing.TwingLoaderFilesystem(TEMPLATE_DIR)
|
const loader = new twing.TwingLoaderFilesystem(TEMPLATE_DIR)
|
||||||
|
|
|
||||||