提交 a8d96bcd 编写于 作者: U u013235949

Fri Jun 21 15:08:00 CST 2024 inscode

上级 ca207a2f
run = "npm i && npm run dev" run = "npm i && npm run dev"
language = "node"
[env] [env]
PATH = "/root/${PROJECT_DIR}/.config/npm/node_global/bin:/root/${PROJECT_DIR}/node_modules/.bin:${PATH}" PATH = "/root/${PROJECT_DIR}/.config/npm/node_global/bin:/root/${PROJECT_DIR}/node_modules/.bin:${PATH}"
XDG_CONFIG_HOME = "/root/.config" XDG_CONFIG_HOME = "/root/.config"
npm_config_prefix = "/root/${PROJECT_DIR}/.config/npm/node_global" npm_config_prefix = "/root/${PROJECT_DIR}/.config/npm/node_global"
[debugger]
program = "main.js"
const { pathToRegexp, match } = require("path-to-regexp");
console.log("欢迎来到 InsCode"); console.log("欢迎来到 InsCode");
// express 的路由匹配使用的 path-to-regexp 库.
// 我们可以在这里测试它的匹配情况.
// path-to-regexp 中有一个 match 函数.
const fn = match("/about", { decode: decodeURIComponent });
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
"license": "ISC", "license": "ISC",
"dependencies": { "dependencies": {
"@types/node": "^18.0.6", "@types/node": "^18.0.6",
"node-fetch": "^3.2.6" "node-fetch": "^3.2.6",
"path-to-regexp": "^7.0.0"
} }
} }
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册