摘要: 创建public文件夹放入html文件 <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Document</title> </head> </html><!DOCTYPE html> <html lang=" 阅读全文
posted @ 2019-12-28 17:48 distant-遥远 阅读(247) 评论(0) 推荐(0)
摘要: // 路由,(根据请求路径和请求方式进行路径的分发处理) // http 的常用请求方式 // post 添加 // get 查询 // put 更新 // delete 删除 // restful api (一种url的格式) const express =require('express'); const app=express(); // ap... 阅读全文
posted @ 2019-12-28 14:57 distant-遥远 阅读(193) 评论(0) 推荐(0)
摘要: const express =require('express'); const app=express(); //实现静态资源服务 let server=app.use(express.static('public')); server.listen(3000,()=>{ console.log( 阅读全文
posted @ 2019-12-28 14:28 distant-遥远 阅读(188) 评论(0) 推荐(0)
摘要: var express =require('express'); var app=express(); app.get('/',function(req,res){ res.send('Hello wold'); }); var server =app.listen(3000,function(){ var host=server.address().address; var port=serve 阅读全文
posted @ 2019-12-28 14:19 distant-遥远 阅读(1069) 评论(0) 推荐(0)
摘要: https://cloud.tencent.com/developer/article/1535701 tomact https://my.oschina.net/u/3769333/blog/1812435 使用端口8989 阅读全文
posted @ 2019-12-28 10:12 distant-遥远 阅读(134) 评论(0) 推荐(0)