change dir stucture
This commit is contained in:
parent
e18b8d3b98
commit
62f8991e11
26 changed files with 8718 additions and 804 deletions
|
|
@ -10,5 +10,5 @@ export const DATA_DIR = `${BASE_DIR}/data`
|
|||
export const UPLOAD_DIR = `${BASE_DIR}/data/uploads`
|
||||
export const UPLOAD_URL = `/uploads`
|
||||
export const COMMON_DIR = `${BASE_DIR}/common/`
|
||||
export const GAME_DIR = `${BASE_DIR}/game/`
|
||||
export const TEMPLATE_DIR = `${BASE_DIR}/game/templates`
|
||||
export const PUBLIC_DIR = `${BASE_DIR}/public/`
|
||||
export const TEMPLATE_DIR = `${BASE_DIR}/templates`
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ import {
|
|||
UPLOAD_DIR,
|
||||
UPLOAD_URL,
|
||||
COMMON_DIR,
|
||||
GAME_DIR,
|
||||
PUBLIC_DIR,
|
||||
TEMPLATE_DIR,
|
||||
} from './Dirs.js'
|
||||
import GameCommon from '../common/GameCommon.js'
|
||||
|
|
@ -37,7 +37,7 @@ const storage = multer.diskStorage({
|
|||
})
|
||||
const upload = multer({storage}).single('file');
|
||||
|
||||
const statics = express.static(GAME_DIR)
|
||||
const statics = express.static(PUBLIC_DIR)
|
||||
|
||||
const render = async (template, data) => {
|
||||
const loader = new twing.TwingLoaderFilesystem(TEMPLATE_DIR)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue