AAAAAAA
This commit is contained in:
parent
53381f0496
commit
193f495e00
@ -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",
|
||||||
|
@ -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;
|
||||||
}
|
}
|
||||||
|
@ -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}`;
|
||||||
|
Loading…
Reference in New Issue
Block a user