没有合适的资源?快使用搜索试试~ 我知道了~
url-shortener:URL 缩短服务的简单原型
共20个文件
js:12个
md:2个
jshintrc:1个
需积分: 9 0 下载量 138 浏览量
2021-06-24
12:47:12
上传
评论
收藏 13KB ZIP 举报
温馨提示
URL 缩短服务的原型 一个简单的 URL 缩短应用程序。 POST /shorten为查询参数link指定的 URL 生成一个短 URL id GET /{id}解析给定id指向的 URL(如果未找到则返回 404,如果被列入黑名单则返回 403) 要尝试运行npm install && npm run serve : 在浏览器中:导航到http://localhost:9000/ 从命令行: curl -X POST -H -d 'link=http://example.com' http://localhost:9000/shorten curl http://localhost:9000/SOME_ID_HERE 东西不见了 前端测试 防止 CSRF 对无 JavaScript 客户端的合理支持
资源推荐
资源详情
资源评论
收起资源包目录
url-shortener-master.zip (20个子文件)
url-shortener-master
index.js 88B
package.json 714B
test
server.js 4KB
LICENSE.md 1KB
.gitignore 738B
lib
config.js 227B
urlStore.js 310B
server.js 1KB
routes
index.js 89B
urlGet.js 408B
shorten.js 876B
urlValidator.js 465B
shortener.js 1KB
main.js 120B
logger.js 76B
public
index.html 10KB
favicon.ico 318B
README.md 640B
.jshintrc 326B
.editorconfig 354B
共 20 条
- 1
资源评论
有道理的同桌
- 粉丝: 27
- 资源: 4653
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功