yuyaqian


  • published version 1.0.0, 4 years ago
  • ```js console.log('肖战男神,朱圣凯男神经') ```

    published version 1.0.0, 4 years ago
  • ```js const fs=require('fs'); class ReadFile{ constructor(options){ Object.assign(this,{},options); const info=fs.statSync(this.pathfile); if(info.isFile()){ const a=fs.readFileSync(this.pathfile,"u

    published version 1.0.0, 4 years ago
  • ```js const fs=require('fs'); const removeDir=(pathDir)=>{ //查找文件夹子目录 const arr=fs.readdirSync(pathDir); //遍历 arr.forEach(item=>{ item=pathDir+"/"+item;//拼接路径 const info=fs.statSync(item);//查看文件信息 if(info.i

    published version 1.0.0, 4 years ago
  • ```js const fs=require('fs'); const copy=(sourcePath,targetPath)=>{ const flay1=fs.existsSync(sourcePath); const flay2=fs.existsSync(targetPath); //容错 if(!flay1){ throw new Error('源文件不存在'+sourcePath); return; }

    published version 1.0.0, 4 years ago
  • ```js const fs=require('fs'); const path=require('path'); const http=require('http'); const url=require('url'); const static="public"; const s=http.createServer((req,res)=>{ let pathname=url.parse(req.url).pathname; if(pathname==="/"){

    published version 1.0.0, 4 years ago
  • ```js //配置 const express=require('express'); const app=express(); const fs=require('fs');

    published version 1.0.0, 4 years ago
  • ```js const express=require('express'); const app=express(); const fs=require('fs');

    published version 1.0.0, 4 years ago
  • ```js const express=require('express'); const app=express(); const fs=require('fs'); app.listen(8080,()=>console.log('开启')) app.use(express.static('public',{index:"index.html"})) app.use(express.json()) //登录 app.post('/api/login',(req,res)=>{

    published version 1.0.0, 4 years ago
  • ```js const express=require('express'); const app=express(); const fs=require('fs'); app.listen(8888,()=>console.log('开启')) app.use(express.static('public')) app.set('view engine',"ejs") app.get('/',(req,res)=>{ res.render('index') })

    published version 1.0.0, 4 years ago
  • ```js const express=require('express'); const app=express(); codes=null; const fs=require('fs'); const loginrtur=require('./server/loginretu') app.listen(8080,()=>console.log('开启')) app.use(express.static('public',{index:"index.html"})) app.use(ex

    published version 1.0.0, 4 years ago
  • ```js const express=require('express'); const app=express(); const fs=require('fs'); const loginrouter=require('./srever/loginrou');//配置路由 登录 const zhurouter=require('./srever/zhurouter')//注册 const randerter=require('./srever/rander') app.listen

    published version 1.0.0, 4 years ago
  • ```js 测试 ```

    published version 1.0.0, 4 years ago
  • published version 1.0.0, 4 years ago
  • published version 1.0.0, 4 years ago