06 2020 档案
koa的基本使用
摘要://操作文件用的 import * as fs from "fs"; //koa 本体 import * as Koa from "koa"; //这个是用来拼路径的 import * as path from "path"; //这个可以拿来做路由 import * as Router from 阅读全文
posted @ 2020-06-11 22:01 DMC-尼禄 阅读(288) 评论(0) 推荐(0)
koa 快速保存文件的服务器
摘要:import * as Koa from "koa"; import * as fs from "fs"; import * as path from "path"; const app = new Koa(); app.use(async ctx => { // console.log(ctx.u 阅读全文
posted @ 2020-06-11 16:45 DMC-尼禄 阅读(407) 评论(0) 推荐(0)
快速搭建 Koa + TS 服务器
摘要:package.json { "name": "myweb", "version": "1.0.0", "description": "", "main": "", "scripts": { "start": "ts-node index.ts" }, "author": "nero", "lice 阅读全文
posted @ 2020-06-10 10:14 DMC-尼禄 阅读(2468) 评论(0) 推荐(0)
node下运行ts
摘要:一、把npm换成淘宝源,下载速度快 npm config set registry https://registry.npm.taobao.org --global npm config set disturl https://npm.taobao.org/dist --global 二、初始化pa 阅读全文
posted @ 2020-06-06 14:11 DMC-尼禄 阅读(5012) 评论(0) 推荐(0)
npm的一些基本配置设置
摘要:1 npmjs官网:https://www.npmjs.com/ npm是世界上最大的JavaScript的包管理器的软件注册表,npm可以共享和分发代码,管理项目中的依赖项; 安装Nodejs时会自动安装npm,但是 局路径是 C:\Users\Caffrey\AppData\Roaming\np 阅读全文
posted @ 2020-06-06 10:51 DMC-尼禄 阅读(3058) 评论(0) 推荐(0)