mirror of
https://github.com/netbymatt/ws4kp.git
synced 2026-04-17 00:59:29 -07:00
add com.chrome.devtools.json
This commit is contained in:
25
src/com.chrome.devtools.mjs
Normal file
25
src/com.chrome.devtools.mjs
Normal file
@@ -0,0 +1,25 @@
|
||||
import path from 'path';
|
||||
|
||||
// get values for devtools json
|
||||
const uuid = 'd2bd1130-560f-4c8e-b2c5-e91073784964';
|
||||
const root = path.resolve('server');
|
||||
|
||||
const DEVTOOLS_CONFIG = {
|
||||
workspace: {
|
||||
uuid,
|
||||
root,
|
||||
},
|
||||
};
|
||||
|
||||
const devTools = (req, res) => {
|
||||
// test for localhost
|
||||
if (['127.0.0.1', '::1', '::ffff:127.0.0.1'].includes(req.ip)) {
|
||||
console.log(DEVTOOLS_CONFIG);
|
||||
res.json(DEVTOOLS_CONFIG);
|
||||
} else {
|
||||
// not localhost
|
||||
res.status(404).send('File not found');
|
||||
}
|
||||
};
|
||||
|
||||
export default devTools;
|
||||
Reference in New Issue
Block a user