add bootstrap
parent
d03e0b6eae
commit
574739e02b
|
@ -2,6 +2,7 @@
|
|||
"name": "scenery",
|
||||
"version": "2.0.0",
|
||||
"scripts": {
|
||||
"bootstrap": "node ./src/bootstrap/bootstrap.js",
|
||||
"dev": "cross-env NODE_OPTIONS=--openssl-legacy-provider nodemon",
|
||||
"build": "cross-env NODE_OPTIONS=--openssl-legacy-provider next build && tsc --project tsconfig.server.json",
|
||||
"build_pages": "next build",
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
const fs = require("fs")
|
||||
const path = require("path")
|
||||
console.log(__dirname)
|
||||
const root_path = path.join(__dirname, "..", "..")
|
||||
const dirs = ["public", "temp", "import", path.join("import", "images"), path.join("public", "thumbnails"), path.join("public", "images")]
|
||||
|
||||
for (const dir of dirs) {
|
||||
const dir_path = path.join(root_path, dir)
|
||||
if (!fs.existsSync(dir_path)) {
|
||||
fs.mkdirSync(dir_path);
|
||||
}
|
||||
}
|
|
@ -16,21 +16,6 @@ declare module "fastify" {
|
|||
}
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////INIT DEFAULT FOLDERS
|
||||
import fs from 'fs'
|
||||
import path from "path"
|
||||
const root_path = path.join(__dirname, "..", "..")
|
||||
const dirs = ["public", "temp", "import", path.join("import", "images"), path.join("public", "thumbnails"), path.join("public", "images")]
|
||||
|
||||
for (const dir of dirs) {
|
||||
const dir_path = path.join(root_path, dir)
|
||||
if (!fs.existsSync(dir_path)) {
|
||||
fs.mkdirSync(dir_path);
|
||||
}
|
||||
}
|
||||
////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////
|
||||
const dev = process.env.NODE_ENV !== 'production'
|
||||
const port = parseInt(process.env.NODE_PORT || config.server_port)
|
||||
|
|
Loading…
Reference in New Issue