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",
"scripts": {
"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/",
"build": "tsc && webpack --config ./webpack/development.js",
"rebuild": "npm run clean && npm run build",

View File

@ -2,7 +2,7 @@ import { Mesh, MeshImport } from "./mesh";
const request_mesh = (filename: string) => {
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);
return request.responseText;
}

View File

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