This commit is contained in:
Alan O'Cull 2023-12-02 19:52:49 -05:00
parent 53381f0496
commit 193f495e00
3 changed files with 5 additions and 2 deletions

View File

@ -11,7 +11,7 @@
"main": "index.js", "main": "index.js",
"scripts": { "scripts": {
"all": "npm run clean && npm run build && npm run start", "all": "npm run clean && npm run build && npm run start",
"clean": "rm -rf build/", "clean": "rm -rf build/ && rm -rf dist/",
"prebuild": "mkdir -p dist/public/ && cp -R assets/* dist/public/", "prebuild": "mkdir -p dist/public/ && cp -R assets/* dist/public/",
"build": "tsc && webpack --config ./webpack/development.js", "build": "tsc && webpack --config ./webpack/development.js",
"rebuild": "npm run clean && npm run build", "rebuild": "npm run clean && npm run build",

View File

@ -2,7 +2,7 @@ import { Mesh, MeshImport } from "./mesh";
const request_mesh = (filename: string) => { const request_mesh = (filename: string) => {
let request = new XMLHttpRequest(); let request = new XMLHttpRequest();
request.open('GET', `localhost:${3000}/mesh/${filename}`, false); request.open('GET', `http://localho.st:${3000}/mesh/${filename}`, false);
request.send(null); request.send(null);
return request.responseText; return request.responseText;
} }

View File

@ -9,6 +9,9 @@ const app: Express = express();
const port = process.env.PORT; const port = process.env.PORT;
app.get('/', (req: Request, res: Response) => { app.get('/', (req: Request, res: Response) => {
console.log(req.url);
console.log(req.body);
console.log(req.query);
const last = req.url.lastIndexOf('/'); const last = req.url.lastIndexOf('/');
const mesh_name = req.url.substring(last + 1); const mesh_name = req.url.substring(last + 1);
const filepath = `assets/pages/${mesh_name}`; const filepath = `assets/pages/${mesh_name}`;