Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

koatty_cli

Package Overview
Dependencies
Maintainers
1
Versions
101
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

koatty_cli - npm Package Compare versions

Comparing version 1.21.0 to 2.1.0

lib/template/middleware/StaticMiddleware.ts

14

lib/index.js

@@ -191,3 +191,3 @@ #!/usr/bin/env node

//add static middleware
copyFile('middleware' + path.sep + 'Static.ts', APP_PATH + path.sep + 'middleware' + path.sep + 'Static.ts');
copyFile('middleware' + path.sep + 'StaticMiddleware.ts', APP_PATH + path.sep + 'middleware' + path.sep + 'StaticMiddleware.ts');

@@ -269,5 +269,5 @@ console.log();

helper.mkDir(APP_PATH + path.sep + 'middleware');
copyFile('middleware' + path.sep + 'middleware.ts', APP_PATH + path.sep + 'middleware' + path.sep + middleware + '.ts', {
copyFile('middleware' + path.sep + 'middleware.ts', APP_PATH + path.sep + 'middleware' + path.sep + middleware + 'Middleware.ts', {
'<Path>': '..',
'<Middleware>': middleware
'<Middleware>': middleware + 'Middleware'
});

@@ -278,3 +278,3 @@

console.log();
console.log(' list: [..., "' + middleware + '"] //加载中间件' + middleware);
console.log(' list: [..., "' + middleware + 'Middleware' + '"] //加载中间件' + middleware);
console.log(' config: { //中间件配置 ');

@@ -364,9 +364,9 @@ console.log(' ...');

if (orm == 'typeorm') {
copyFile('middleware' + path.sep + 'TypeormMid.ts', APP_PATH + path.sep + 'middleware' + path.sep + 'TypeormMid.ts');
copyFile('middleware' + path.sep + 'TypeormMiddleware.ts', APP_PATH + path.sep + 'middleware' + path.sep + 'TypeormMiddleware.ts');
console.log();
console.log(' please modify /app/config/middlewate.ts file:');
console.log();
console.log(' list: [..., "TypeormMid"]');
console.log(' list: [..., "TypeormMiddleware"]');
console.log(' config: { //中间件配置 ');
console.log(' TypeormMid: {');
console.log(' TypeormMiddleware: {');
console.log(` "type": "mysql", //mysql, mariadb, postgres, sqlite, mssql, oracle, mongodb, cordova

@@ -373,0 +373,0 @@ "host": "localhost",

@@ -5,11 +5,11 @@ /**

* @ license: Apache License 2.0
* @ version: 2020-04-30 15:19:46
* @ version: 2020-05-11 15:16:37
*/
export default {
list: ['Static'], //加载的中间件列表
list: ['StaticMiddleware'], //加载的中间件列表
config: { //中间件配置
// 静态资源中间件默认未开启
Static: false
StaticMiddleware: false
// 需要开启请修改为:
// Static: {
// StaticMiddleware: {
// cache: true

@@ -16,0 +16,0 @@ // },

@@ -16,3 +16,3 @@ {

"dependencies": {
"koatty": "^1.x.x",
"koatty": "^2.x.x",
"think_static": "^2.x.x"

@@ -29,4 +29,4 @@ },

"supervisor": "^0.12.0",
"ts-node": "^8.9.0",
"tslint": "^6.1.1",
"ts-node": "^8.10.1",
"tslint": "^6.1.2",
"tslint-config-alloy": "^0.2.1",

@@ -33,0 +33,0 @@ "typescript": "^3.8.3"

{
"name": "koatty_cli",
"version": "1.21.0",
"version": "2.1.0",
"description": "Koatty command line tool.",

@@ -5,0 +5,0 @@ "scripts": {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc