03 2021 档案

摘要:const express = require("express");const port = 8080;const app = express();/* 解析post */const body = require("body-parser");/* 解析cookie */const cookieP 阅读全文
posted @ 2021-03-31 17:10 莣ㄋ噯 阅读(65) 评论(0) 推荐(0) 编辑
摘要:const http = require("http");const mysql = require("mysql");const querystring = require("querystring");const co = require("co-mysql");const url = requ 阅读全文
posted @ 2021-03-30 11:13 莣ㄋ噯 阅读(239) 评论(0) 推荐(0) 编辑
摘要:①安装服务:mysqld --install ②初始化: mysqld --initialize --console ③开启服务:net start mysql ④关闭服务:net stop mysql ⑤登录mysql:mysql -u root -p Enter PassWord:(密码) ⑥修 阅读全文
posted @ 2021-03-29 17:36 莣ㄋ噯 阅读(1026) 评论(0) 推荐(0) 编辑
摘要:增 INSERT INSERT INTO <表> (字段,...) VALUES (值,...); INSERT INTO `user_table` (`username`,`password`) VALUES ('lisi',‘654321’); 删 DELETE DELETE FROM <表> 阅读全文
posted @ 2021-03-29 17:17 莣ㄋ噯 阅读(40) 评论(0) 推荐(0) 编辑
摘要://服务端 let io = require('socket.io')();let userList = [ { name: "用户1", age: "18", id: "00000001" }, { name: "用户2", age: "18", id: "00000002" }, { name: 阅读全文
posted @ 2021-03-27 17:30 莣ㄋ噯 阅读(128) 评论(0) 推荐(0) 编辑
摘要://服务端let io = require('socket.io')();io.sockets.on('connection', socket => { //初始化之后通过join加入room1房间 socket.join("room1", function () { console.log("Jo 阅读全文
posted @ 2021-03-27 16:48 莣ㄋ噯 阅读(293) 评论(0) 推荐(0) 编辑
摘要:const io = require('socket.io')({cors:true});//{cors:true}处理跨域io.on('connection', client => { client.on('event', data => { console.log(data); }); setT 阅读全文
posted @ 2021-03-27 14:59 莣ㄋ噯 阅读(541) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示