Git Product home page Git Product logo

itranswarp.js's Introduction

itranswarp.js

icon

A nodejs powered website containing blog, wiki, discuss and search engine.

Build Status

  • based on koa2 with ES7 async/await
  • OAuth2 integration (weibo, QQ, facebook, etc.)
  • SEO support
  • REST api
  • customized css with uikit2
  • fully tested (using mocha/chai)

Environment

Nodejs: >= 8.x

MySQL: 5.6 ~ 5.7

Memcache

Nginx

Configurations

You should make a copy of config_default.js to config_<NODE_ENV>.js, and override some of the settings you needed.

For example, if NODE_ENV=production, you need create config_production.js:

$ cp www/config_default.js www/config_production.js

You can safely remove any settings you do not changed.

Install packages

Run npm install to install all required packages:

$ npm install

Initialize database

Run node schema > init_db.sql to generate initial schema as well as administrator's email and password.

You will get init_db.sql file in current directory. Run this SQL script by:

$ mysql -u root -p < init_db.sql

NOTE: re-run this SQL file will remove all existing data.

Test

iTranswarp.js is fully tested. To run tests, make sure:

  • run MySQL in localhost and set root password as password.
  • run Memcache in localhost.

Then run:

$ mocha

Schema will be created in MySQL test database before run tests.

Run

All settings can be override by environments:

export NODE_ENV=development
export DOMAIN=local.liaoxuefeng.com
export DB_PASSWORD=xxx

Please check config_default.js for more settings.

Then run:

$ node start.js

You should able to see the home page in the browser with address http://localhost:2017/.

If you want to sign in to management console, go to http://localhost:2017/manage/signin, and sign in using the email and password you entered when running node schema.

Changelog

9 Dec 2018

Responsive navigation bar.

2.1 - 14 Oct 2017

  • collapsable tree view for wiki
  • AD support

Database schema update:

DROP TABLE `randoms`;

CREATE TABLE `randoms` (
  `id` varchar(50) NOT NULL,
  `name` varchar(50) NOT NULL,
  `value` varchar(50) NOT NULL,
  `expired_at` bigint(20) NOT NULL,
  `created_at` bigint(20) NOT NULL,
  `updated_at` bigint(20) NOT NULL,
  `version` bigint(20) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `uni_rnd_value` (`value`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

CREATE TABLE `adslots` (
  `id` varchar(50) NOT NULL,
  `alias` varchar(50) NOT NULL,
  `name` varchar(100) NOT NULL,
  `description` varchar(1000) NOT NULL,
  `price` bigint(20) NOT NULL,
  `width` bigint(20) NOT NULL,
  `height` bigint(20) NOT NULL,
  `num_slots` bigint(20) NOT NULL,
  `num_auto_fill` bigint(20) NOT NULL,
  `auto_fill` text NOT NULL,
  `created_at` bigint(20) NOT NULL,
  `updated_at` bigint(20) NOT NULL,
  `version` bigint(20) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `uni_adslot_alias` (`alias`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

CREATE TABLE `adperiods` (
  `id` varchar(50) NOT NULL,
  `user_id` varchar(50) NOT NULL,
  `adslot_id` varchar(50) NOT NULL,
  `display_order` bigint(20) NOT NULL,
  `start_at` varchar(10) NOT NULL,
  `end_at` varchar(10) NOT NULL,
  `created_at` bigint(20) NOT NULL,
  `updated_at` bigint(20) NOT NULL,
  `version` bigint(20) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

CREATE TABLE `admaterials` (
  `id` varchar(50) NOT NULL,
  `user_id` varchar(50) NOT NULL,
  `adperiod_id` varchar(50) NOT NULL,
  `cover_id` varchar(50) NOT NULL,
  `weight` bigint(20) NOT NULL,
  `start_at` varchar(10) NOT NULL,
  `end_at` varchar(10) NOT NULL,
  `geo` varchar(100) NOT NULL,
  `keywords` varchar(100) NOT NULL,
  `url` varchar(1000) NOT NULL,
  `created_at` bigint(20) NOT NULL,
  `updated_at` bigint(20) NOT NULL,
  `version` bigint(20) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

2.0 - 15 Jul 2017

  • fully async/await support
  • markdown plugin support
  • based on koa 2.x

1.11 - 21 Jul 2015

  • support article, wiki, discuss.
  • based on koa 1.x

itranswarp.js's People

Contributors

michaelliao avatar mkeating avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

itranswarp.js's Issues

schema.js里面有问题

变量sql_init_admin_user值里面有个“locked_until”,您少写了个n,导致mysql报错。

less-watch-compiler 提示少了文件

D:\Workspaces\nodejs\itranswarp\www>less-watch-compiler static/css/less static/css itranswarp.less
Watching directory for file changes.
Does not exist : static\css\less\uikit\themes\almost-flat\slideshow.less

求解如何解决

阿里云开放搜索 api

数据操作中的sign_mode字段为什么会丢到签名中去 问了阿里官方让我咨询作者大人

找不到css

Error: ENOENT: no such file or directory, open '/data/soft/itranswarp.js-1.12/www/static/themes/default/css/itranswarp.css'

关于开发

感觉这个项目现在做得很不错了,但是想着手帮忙做点贡献,真的有点难。fork和star都不少,但是pull request和contributors却很少。

从零基础开始,看老师的教程入门,到现在能处理好跨平台开发的问题、能在windows下的vscode里面调试。花费了一个月的业余时间,收获也不少。

这周尝试着把wiki的目录停靠在浏览器顶部,最后还是存在难以解决的小问题。

给老师提一些建议,开个群可以讨论一下,或许对项目的贡献会有帮助。

如何初始化数据库

说明中描述:
Initialize database

Run node schema > init_db.sql to generate initial schema as well as administrator's email and password.

You will get init_db.sql file in current directory. Run this SQL script by:

$ mysql -u root -p < init_db.sql
NOTE: re-run this SQL file will remove all existing data.

已执行操作:
我装好了node8,复制config_default.js为config_development.js,修改了数据库连接的密码,其他没动,然后在www目录执行了npm install

问题:对于node schema > init_db.sql这个命令我真的看不懂,
首先,应该在什么目录执行这个命令;
其次,不管我是在"www",还是在"www/script"目录执行,都是cannt find module

添加评论时候报错 Board not found

[2016-12-14T09:39:13.331Z] POST /api/comments/wiki/00148170165015348eed4f326694f0faeaddd40146689f1000
[API Request]
{
"tag": "wikiffffffffffffffffffffffffff",
"name": "asdfas",
"content": "大是打发斯蒂芬"
}
17:39:13.332 [Warp@ca6d3618] CONNECTION: opened from pool: 1
17:39:13.332 [Warp@ca6d3618] SQL: select id, cover_id, content_id, views, name, tag, description, created_at, updated_at, version from wikis where id='00148170165015348eed4f326694f0faeaddd40146689f1000'
17:39:13.332 [Warp@ca6d3618] CONNECTION: released to pool: 0
17:39:13.333 [Warp@ca6d3618] CONNECTION: opened from pool: 1
17:39:13.333 [Warp@ca6d3618] SQL: select id, topics, locked, tag, name, description, display_order, created_at, updated_at, version from boards order by display_order
17:39:13.333 [Warp@ca6d3618] CONNECTION: released to pool: 0
X-Execution-Time: 3
[Error] error when handle url: /api/comments/wiki/00148170165015348eed4f326694f0faeaddd40146689f1000
undefined
[API Response]
{
"error": "entity:notfound",
"data": "Board",
"message": "Board not found."
}

关于文章更新的问题

你好,看了下廖雪峰的网站使用的这个框架搭建的,想问下这个更新文章是有单独的ui后台可以编辑的么还是和hexo一样,要项目检出来,然后每次要发布的静态博客站点

官网建议

建议大神官网给弄个全文搜索的东西,模糊搜索关键字的博客文章,一篇篇的翻着找太麻烦了

图片显示不出来

想clone老师的博客学习一下
发现主页的图片显示不出来
自己上传图片时显示:Invalid parameter: image
错误信息如下:
16:19:47.993 [Warp@03788015] CONNECTION: released to pool: 0
attachment data is not an image.
X-Execution-Time: 33
[Error] error when handle url: /api/articles
undefined
[API Response]
{
"error": "parameter:invalid",
"data": "image",
"message": "Invalid parameter: image"
}

Docs issue

When we begin to init the DB , the steps should be:

mysql -u root -p < schema.sql (not init_db.sql)

this 的 update

this 那节

'use strict';

var xiaoming = {
    name: '小明',
    birth: 1990,
    age: function () {
        var that = this; // 在方法内部一开始就捕获this
        function getAgeFromBirth() {
            var y = new Date().getFullYear();
            return y - that.birth; // 用that而不是this
        }
        return getAgeFromBirth();
    }
};

xiaoming.age(); // 25

现在可以写成

'use strict';

var xiaoming = {
    name: '小明',
    birth: 1990,
    age: function () {
        getAgeFromBirth ()=>{
            var y = new Date().getFullYear();
            return y - this.birth; // 用that而不是this
        }
        return getAgeFromBirth();
    }
};

xiaoming.age(); // 25

了,可以update一下

初始化数据库失败了.

初始化数据库失败了.

2017-12-12T06:12:14.636Z - info: init sequelize...
sequelize deprecated String based operators are now deprecated. Please use Symbol based operators for better security, read more at http://docs.sequelizejs.com/manual/tutorial/querying.html#operators ../../node_modules/sequelize/lib/sequelize.js:236:13
2017-12-12T06:12:14.762Z - info: model AdPeriod defined for table: adperiods.
(node:24461) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): TypeError: Function has non-object prototype 'undefined' in instanceof check
(node:24461) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

没学过nodejs. 都是按照步骤一步一步弄的. 麻烦大大看看.

关于网站数据备份问题

老师好,我如果想要把网站从一个云服务商迁移到另一个云服务商,除了要备份数据库外,还需要备份网站哪些数据才能在另一个地方还原呢?

关于README

我按照readme的要求在ubuntu下安装,发现安装失败,目前看应该是json支持的问题。报错如下:
npm ERR! install Couldn't read dependencies
npm ERR! Error: ENOENT, open '/home/wangth/git/itranswarp.js/package.json'
npm ERR! If you need help, you may report this log at:
npm ERR! http://github.com/isaacs/npm/issues
npm ERR! or email it to:
npm ERR! [email protected]

npm ERR! System Linux 3.13.0-43-generic
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install"
npm ERR! cwd /home/wangth/git/itranswarp.js
npm ERR! node -v v0.10.25
npm ERR! npm -v 1.3.10
npm ERR! path /home/wangth/git/itranswarp.js/package.json
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/wangth/git/itranswarp.js/npm-debug.log
npm ERR! not ok code 0

目前正在排错。

作者如果把所有需要用的库例举一下,就更好了。

今天部署过程中遇到的问题

环境:Centos 7.4 x64 ,MySQL 5.7.21 Node.js 8.9.4

export NODE_ENV=development
cp config_default.js config_development.js
vim config_development.js
cp config_development.js config_development.js.bak
  • 建议装好Node.js 之后先去www目录执行 npm install
    1、初始化数据库init-db.js;
    SQL语句需要更改
    原:
    let cmd = mysql -h ${DB_HOST} -u root --password=${info.rootPassword} -e "CREATE DATABASE ${DATABASE};";
    其中--password=${info.rootPassword} 修改为: --password='${info.rootPassword}'
    不然密码会报错;
  • 2.数据库root密码中不能包含右斜杠 “\” 不然密码中的右斜杠会被删除掉然后报错;

  • 初始化CSS
    // 先去www目录执行 npm install 不然报错
    需要全局安装 gulp fab
    npm install --global gulp
    npm install --global fab
    然后修改release_sample.sh 注释掉里面的host
    sh release_sample.sh

  • 后台跑我用的是screen

supervisor nohup 都试过 不理想

Python3教程章节之间取消快捷跳转

廖老师您好,最近一个月一直在您的python教程中学习,但是发现最近在您优化了左侧教程目录之后,好像每篇小章节的文末已经没有了左右箭头快捷跳转按键,导致每看完一篇都需要人为往上翻到左侧大目录进行点击,感觉这样没有之前方便呢,提供个小小的意见,希望老师能改进改进,同时感谢您这般无私分享各种教程,致敬!

关于手机端

手机端应该也适配下,这样在上下班的路上也可以看

can not create schema

instructions say to run node schema > init_db.sql to create schema

but I get:

$node schema > init_db.sql
module.js:549
throw err;
^

Error: Cannot find module '/var/www/itranswarp.js/www/schema'
at Function.Module._resolveFilename (module.js:547:15)
at Function.Module._load (module.js:474:25)
at Function.Module.runMain (module.js:693:10)
at startup (bootstrap_node.js:188:16)
at bootstrap_node.js:609:3

I tried npm install schema but get same error

Tabel of contents scroll with page

The TOC will scroll when page srcolls, this is not so convenient since sometimes I just want to read the TOC while keeping page fixed, or vice versa.

marked baseUrls is not defined

When I start up by supervisor(Found that conf file using --use_strict), show the following error:
(No show run node start.js or ./start.js)

ReferenceError: baseUrls is not defined
at /srv/kbckc/www/node_modules/marked/lib/marked.js:1147:10
at Object. (/srv/kbckc/www/node_modules/marked/lib/marked.js:1313:4)
at Module._compile (module.js:643:30)
at Object.Module._extensions..js (module.js:654:10)
at Module.load (module.js:556:32)
at tryModuleLoad (module.js:499:12)
at Function.Module._load (module.js:491:3)
at Module.require (module.js:587:17)
at require (internal/module.js:11:18)
at Object. (/srv/kbckc/www/md.js:10:14)
at Module._compile (module.js:643:30)
at Object.Module._extensions..js (module.js:654:10)
at Module.load (module.js:556:32)
at tryModuleLoad (module.js:499:12)
at Function.Module._load (module.js:491:3)
at Module.require (module.js:587:17)

should I add value to marked? or check any others?

请教忙看看访问页面报404错的问题

node.js版本是v7.7.1
启动时日志如下:
c:\MY_JOB\GitHub\itranswarp.js\www>node --harmony app.js
loading config_development...
configuration loaded:
{
"domain": "www.maoqiongonline.cn",
"theme": "default",
"session": {
"cookie": "isession",
"salt": "iTranswarp.js",
"expires": 604800,
"httpsForManagement": false
},
"db": {
"host": "localhost",
"port": 3306,
"user": "root",
"password": "whosyourdaddy",
"database": "itranswarp",
"connectTimeout": 3000,
"connectionLimit": 20,
"acquireTimeout": 3000,
"queueLimit": 10
},
"cdn": {
"static_prefix": ""
},
"cache": {
"prefix": "it/",
"host": "127.0.0.1",
"port": 11211,
"timeout": 1000,
"retries": 3
},
"queue": {
"host": "127.0.0.1",
"port": 6379
},
"search": {
"provider": "site_search",
"configs": {
"search_url": "http://www.baidu.com/s?ie=utf-8&wd=%s"
}
},
"oauth2": {},
"END": "END",
"version": "1.0",
"build": "$BUILD$"
}
init mysql with mysql-warp...
[Pool@dd3b44e3] Connection pool created.
found model: article
found model: attachment
found model: authuser
found model: board
found model: category
found model: comment
found model: localuser
found model: navigation
found model: random
found model: reply
found model: resource
found model: setting
found model: text
found model: topic
found model: user
found model: webpage
found model: wiki
found model: wikipage
koa deprecated Support for generators will be removed in v3. See the documentation for examples of how to convert old middleware https://github.com/koajs/koa/tree/v2.x#old-signature-middleware-v1x---deprecated app.js:55:9
Load i18n file: ./views/i18n/zh_CN.json
Locale zh_CN loaded.
koa deprecated Support for generators will be removed in v3. See the documentation for examples of how to convert old middleware https://github.com/koajs/koa/tree/v2.x#old-signature-middleware-v1x---deprecated app.js:104:5
koa deprecated Support for generators will be removed in v3. See the documentation for examples of how to convert old middleware https://github.com/koajs/koa/tree/v2.x#old-signature-middleware-v1x---deprecated app.js:112:5
init memcache...
build search engine: site_search
external: true
default settings:
{
"website": {
"name": "My Website",
"description": "Powered by iTranswarp.js",
"keywords": "",
"xmlns": "",
"custom_header": "",
"custom_footer": ""
},
"snippets": {
"body_top": "",
"body_bottom": "",
"sidebar_left_top": "",
"sidebar_left_bottom": "",
"sidebar_right_top": "",
"sidebar_right_bottom": "",
"content_top": "",
"content_bottom": ""
}
}
Not a route definition: $getRecentArticles
Not a route definition: $getArticlesByCategory
Not a route definition: $getAllArticles
Not a route definition: $getArticles
Not a route definition: $getArticle
found: GET /feed in articleApi.js
found route: GET /feed
found: GET /api/articles/:id in articleApi.js
found route: GET /api/articles/:id
found: GET /api/articles in articleApi.js
found route: GET /api/articles
found: POST /api/articles in articleApi.js
found route: POST /api/articles
found: POST /api/articles/:id in articleApi.js
found route: POST /api/articles/:id
found: POST /api/articles/:id/delete in articleApi.js
found route: POST /api/articles/:id/delete
Not a route definition: $getAttachment
Not a route definition: $getAttachments
Not a route definition: $createAttachment
found: GET /files/attachments/:id in attachmentApi.js
found route: GET /files/attachments/:id
found: GET /files/attachments/:id/:size in attachmentApi.js
found route: GET /files/attachments/:id/:size
found: GET /api/attachments/:id in attachmentApi.js
found route: GET /api/attachments/:id
found: GET /api/attachments in attachmentApi.js
found route: GET /api/attachments
found: POST /api/attachments/:id/delete in attachmentApi.js
found route: POST /api/attachments/:id/delete
found: POST /api/attachments in attachmentApi.js
found route: POST /api/attachments
Not a route definition: $getCategories
Not a route definition: $getCategory
Not a route definition: $getNavigationMenus
found: GET /api/categories in categoryApi.js
found route: GET /api/categories
found: GET /api/categories/:id in categoryApi.js
found route: GET /api/categories/:id
found: POST /api/categories in categoryApi.js
found route: POST /api/categories
WARNING: invalid doc line: @param {string,optional} description - The description of the category.
found: POST /api/categories/all/sort in categoryApi.js
found route: POST /api/categories/all/sort
found: POST /api/categories/:id in categoryApi.js
found route: POST /api/categories/:id
found: POST /api/categories/:id/delete in categoryApi.js
found route: POST /api/categories/:id/delete
Not a route definition: $getNavigationMenus
Not a route definition: $createTopic
Not a route definition: $getBoard
Not a route definition: $getBoardByTag
Not a route definition: $getBoards
Not a route definition: $getTopic
Not a route definition: $getTopics
Not a route definition: $getTopicsByRef
Not a route definition: $getReplies
Not a route definition: $getFirstReplies
Not a route definition: $getReplyPageIndex
found: GET /api/ref/:id/topics in discussApi.js
found route: GET /api/ref/:id/topics
found: GET /api/boards in discussApi.js
found route: GET /api/boards
found: POST /api/boards in discussApi.js
found route: POST /api/boards
found: GET /api/boards/:id in discussApi.js
found route: GET /api/boards/:id
WARNING: no api docs found for api: /api/boards/:id
found: POST /api/boards/:id in discussApi.js
found route: POST /api/boards/:id
found: POST /api/boards/:id/lock in discussApi.js
found route: POST /api/boards/:id/lock
found: POST /api/boards/:id/unlock in discussApi.js
found route: POST /api/boards/:id/unlock
found: POST /api/boards/all/sort in discussApi.js
found route: POST /api/boards/all/sort
found: GET /api/boards/:id/topics in discussApi.js
found route: GET /api/boards/:id/topics
found: POST /api/boards/:id/topics in discussApi.js
found route: POST /api/boards/:id/topics
found: GET /api/topics in discussApi.js
found route: GET /api/topics
found: GET /api/replies in discussApi.js
found route: GET /api/replies
found: POST /api/replies/:id/delete in discussApi.js
found route: POST /api/replies/:id/delete
found: POST /api/topics/:id/delete in discussApi.js
found route: POST /api/topics/:id/delete
found: POST /api/topics/:id/replies in discussApi.js
found route: POST /api/topics/:id/replies
found: GET / in home.js
found route: GET /
found: GET /category/:id in home.js
found route: GET /category/:id
found: GET /article/:id in home.js
found route: GET /article/:id
found: GET /webpage/:alias in home.js
found route: GET /webpage/:alias
found: GET /wikipage/:id in home.js
found route: GET /wikipage/:id
found: GET /wiki/:id in home.js
found route: GET /wiki/:id
found: GET /wiki/:wid/:pid in home.js
found route: GET /wiki/:wid/:pid
found: POST /api/comments/:ref_type/:ref_id in home.js
found route: POST /api/comments/:ref_type/:ref_id
WARNING: no api docs found for api: /api/comments/:ref_type/:ref_id
found: GET /discuss in home.js
found route: GET /discuss
found: GET /discuss/:id in home.js
found route: GET /discuss/:id
found: GET /discuss/:bid/:tid in home.js
found route: GET /discuss/:bid/:tid
found: GET /discuss/:bid/topics/create in home.js
found route: GET /discuss/:bid/topics/create
found: GET /discuss/topic/:tid/find/:rid in home.js
found route: GET /discuss/topic/:tid/find/:rid
found: GET /user/:id in home.js
found route: GET /user/:id
found: GET /me/profile in home.js
found route: GET /me/profile
found: GET /auth/signin in home.js
found route: GET /auth/signin
found: GET /search in home.js
found route: GET /search
found: GET /manage/signin in manage.js
found route: GET /manage/signin
found: GET /manage/ in manage.js
found route: GET /manage/
found: GET /manage/overview/(index)? in manage.js
found route: GET /manage/overview/(index)?
found: GET /manage/article/(article_list)? in manage.js
found route: GET /manage/article/(article_list)?
found: GET /manage/article/category_list in manage.js
found route: GET /manage/article/category_list
found: GET /manage/article/create_article in manage.js
found route: GET /manage/article/create_article
found: GET /manage/article/edit_article in manage.js
found route: GET /manage/article/edit_article
found: GET /manage/article/create_category in manage.js
found route: GET /manage/article/create_category
found: GET /manage/article/edit_category in manage.js
found route: GET /manage/article/edit_category
found: GET /manage/webpage/(webpage_list)? in manage.js
found route: GET /manage/webpage/(webpage_list)?
found: GET /manage/webpage/create_webpage in manage.js
found route: GET /manage/webpage/create_webpage
found: GET /manage/webpage/edit_webpage in manage.js
found route: GET /manage/webpage/edit_webpage
found: GET /manage/wiki/(wiki_list)? in manage.js
found route: GET /manage/wiki/(wiki_list)?
found: GET /manage/wiki/create_wiki in manage.js
found route: GET /manage/wiki/create_wiki
found: GET /manage/wiki/edit_wiki in manage.js
found route: GET /manage/wiki/edit_wiki
found: GET /manage/wiki/wiki_tree in manage.js
found route: GET /manage/wiki/wiki_tree
found: GET /manage/wiki/edit_wikipage in manage.js
found route: GET /manage/wiki/edit_wikipage
found: GET /manage/discuss/(board_list)? in manage.js
found route: GET /manage/discuss/(board_list)?
found: GET /manage/discuss/create_board in manage.js
found route: GET /manage/discuss/create_board
found: GET /manage/discuss/edit_board in manage.js
found route: GET /manage/discuss/edit_board
found: GET /manage/discuss/reply_list in manage.js
found route: GET /manage/discuss/reply_list
found: GET /manage/discuss/topic_list in manage.js
found route: GET /manage/discuss/topic_list
found: GET /manage/attachment/(attachment_list)? in manage.js
found route: GET /manage/attachment/(attachment_list)?
found: GET /manage/user/(user_list)? in manage.js
found route: GET /manage/user/(user_list)?
found: GET /manage/navigation/(navigation_list)? in manage.js
found route: GET /manage/navigation/(navigation_list)?
found: GET /manage/navigation/create_navigation in manage.js
found route: GET /manage/navigation/create_navigation
found: GET /manage/setting/ in manage.js
found route: GET /manage/setting/
found: GET /manage/setting/:g in manage.js
found route: GET /manage/setting/:g
Not a route definition: $getNavigation
Not a route definition: $getNavigations
found: GET /api/navigations/all/menus in navigationApi.js
found route: GET /api/navigations/all/menus
found: GET /api/navigations in navigationApi.js
found route: GET /api/navigations
found: POST /api/navigations in navigationApi.js
found route: POST /api/navigations
found: POST /api/navigations/all/sort in navigationApi.js
found route: POST /api/navigations/all/sort
found: POST /api/navigations/:id/delete in navigationApi.js
found route: POST /api/navigations/:id/delete
Not a route definition: $getNavigationMenus
Not a route definition: $getSettings
Not a route definition: $getSetting
Not a route definition: $setSetting
Not a route definition: $setSettings
Not a route definition: $getSettingsByDefaults
Not a route definition: $getWebsiteSettings
Not a route definition: $getSnippets
found: GET /api/settings/definitions in settingApi.js
found route: GET /api/settings/definitions
WARNING: no api docs found for api: /api/settings/definitions
found: GET /api/settings/website in settingApi.js
found route: GET /api/settings/website
WARNING: no api docs found for api: /api/settings/website
found: POST /api/settings/website in settingApi.js
found route: POST /api/settings/website
WARNING: no api docs found for api: /api/settings/website
found: GET /api/settings/snippets in settingApi.js
found route: GET /api/settings/snippets
WARNING: no api docs found for api: /api/settings/snippets
found: POST /api/settings/snippets in settingApi.js
found route: POST /api/settings/snippets
WARNING: no api docs found for api: /api/settings/snippets
Not a route definition: $getUser
Not a route definition: $getUsers
Not a route definition: $bindUsers
found: GET /api/users/:id in userApi.js
found route: GET /api/users/:id
WARNING: no api docs found for api: /api/users/:id
found: GET /api/users in userApi.js
found route: GET /api/users
WARNING: no api docs found for api: /api/users
found: POST /api/authenticate in userApi.js
found route: POST /api/authenticate
WARNING: invalid doc line: @param email: Email address, in lower case.
WARNING: invalid doc line: @param passwd: The password, 40-chars SHA1 string, in lower case.
found: GET /auth/signout in userApi.js
found route: GET /auth/signout
found: GET /auth/from/:name in userApi.js
found route: GET /auth/from/:name
found: GET /auth/callback/:name in userApi.js
found route: GET /auth/callback/:name
found: POST /api/users/:id/lock in userApi.js
found route: POST /api/users/:id/lock
WARNING: no api docs found for api: /api/users/:id/lock
Not a route definition: $getNavigationMenus
Not a route definition: $getWebpage
Not a route definition: $getWebpages
Not a route definition: $getWebpageByAlias
found: GET /api/webpages/:id in webpageApi.js
found route: GET /api/webpages/:id
found: GET /api/webpages in webpageApi.js
found route: GET /api/webpages
found: POST /api/webpages in webpageApi.js
found route: POST /api/webpages
found: POST /api/webpages/:id in webpageApi.js
found route: POST /api/webpages/:id
found: POST /api/webpages/:id/delete in webpageApi.js
found route: POST /api/webpages/:id/delete
Not a route definition: $getNavigationMenus
Not a route definition: $getWikiTree
Not a route definition: $getWiki
Not a route definition: $getWikis
Not a route definition: $getWikiPage
found: GET /api/wikis/:id in wikiApi.js
found route: GET /api/wikis/:id
found: GET /api/wikis in wikiApi.js
found route: GET /api/wikis
found: POST /api/wikis in wikiApi.js
found route: POST /api/wikis
found: POST /api/wikis/:id in wikiApi.js
found route: POST /api/wikis/:id
found: POST /api/wikis/:id/wikipages in wikiApi.js
found route: POST /api/wikis/:id/wikipages
found: POST /api/wikis/wikipages/:id in wikiApi.js
found route: POST /api/wikis/wikipages/:id
found: GET /api/wikis/wikipages/:id in wikiApi.js
found route: GET /api/wikis/wikipages/:id
found: GET /api/wikis/:id/wikipages in wikiApi.js
found route: GET /api/wikis/:id/wikipages
found: POST /api/wikis/wikipages/:id/move in wikiApi.js
found route: POST /api/wikis/wikipages/:id/move
found: POST /api/wikis/wikipages/:id/delete in wikiApi.js
found route: POST /api/wikis/wikipages/:id/delete
found: POST /api/wikis/:id/delete in wikiApi.js
found route: POST /api/wikis/:id/delete
application start in development mode at 8080...

中间显示有一些路由没有找到,然后访问http://localhost:8080报404错,后台日志如下:
[2017-03-03T00:41:46.388Z] GET /
X-Execution-Time: 2
X-Execution-Time: 3
[Error] error when handle url: /
NotFoundError: Not Found
at Object.throw (c:\MY_JOB\GitHub\itranswarp.js\www\node_modules\koa\lib\context.js:91:23)
at Object.theMiddleware (c:\MY_JOB\GitHub\itranswarp.js\www\app.js:158:23)
at theMiddleware.next ()
at onFulfilled (c:\MY_JOB\GitHub\itranswarp.js\www\node_modules\koa\node_modules\koa-convert\node_modules\co\index.js:65:19)
at process._tickCallback (internal/process/next_tick.js:109:7)
是版本的原因还是,请指教,谢谢!~

【网站合作】你好,我是tctip打赏插件,邀请您进行合作

你好。
我是tctip打赏插件的作者,同时也是您博客的读者。
您的博客内容非常优质,同时文章后面会附有打赏二维码。
因此邀请您使用tctip打赏插件,为您博客的用户提供一个更方便的回馈的渠道。
tctip是一个js插件,免费开源,使用简单几行代码即可在贵站生成一个打赏侧边栏,是优质博客等网站打赏的不二选择。
tctip 的github网址为: http://github.com/greedying/tctip
欢迎加qq 群 188087193交流。
我的个人qq:342285717

Install on windows

I tried to install it on windows, but some symbol links missing, so I need to copy them manually.
BTW, for css file, we need to use "npm -g less" to install less and use lessc compile it.

When i begun to add a new article, but the categories are empty,and there is no page for me to create or add new category.

Initialize database

初始化数据库部分,生成的init_db.sql中有非SQL语句,导入数据库时会报错

启动项目是出现 return binding.readdir(pathModule.toNamespacedPath(path), options.encoding);

s.js:924
  return binding.readdir(pathModule.toNamespacedPath(path), options.encoding);
                 ^
Error: ENOENT: no such file or directory, scandir './views/i18n'
    at Object.fs.readdirSync (fs.js:924:18)
    at Object.loadI18NTranslators (/home/www-data/itranswarp.js/www/i18n.js:34:24)
    at Object.<anonymous> (/home/www-data/itranswarp.js/www/app.js:29:28)
    at Module._compile (module.js:641:30)
    at Object.Module._extensions..js (module.js:652:10)
    at Module.load (module.js:560:32)
    at tryModuleLoad (module.js:503:12)
    at Function.Module._load (module.js:495:3)
    at Module.require (module.js:585:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/home/www-data/itranswarp.js/www/start.js:10:11)
    at Module._compile (module.js:641:30)
    at Object.Module._extensions..js (module.js:652:10)
    at Module.load (module.js:560:32)
    at tryModuleLoad (module.js:503:12)
    at Function.Module._load (module.js:495:3)

官网使用后体验

首先感谢作者制作的教程,给初学者,本人每天都在看Python的教程,感觉学习效果还不错.
使用建议:
1.建议在页面布局上将目录模块和内容页面模块分开.将目录像标题一样固定悬浮在页面上.
在内容模块上滑动鼠标滚轮,目录不随之滚动

node schema > init_db.sql

node schema > init_db.sql

我找遍了代码, 也没有看到schema.js, 这个怎么能运行

please help to solve it

I tried to run node schema > init_db.sql; but no any respond awaiting long time.
I also tried run without >, it seems work which asked me create account. Its seems not write successfully.

06:46:05.924 [Warp@b81f2e1c] CONNECTION: opened from pool: 1
06:46:05.926 [Warp@b81f2e1c] SQL: select id, name, tag, description, display_order, created_at, updated_at, version from categories order by display_order
06:46:05.929 [Warp@b81f2e1c] CONNECTION: released to pool: 0
X-Execution-Time: 207
[Error] error when handle url: /
Error: ER_NO_SUCH_TABLE: Table 'jack.categories' doesn't exist
at Query.Sequence._packetToError (/root/jack/www/node_modules/mysql-warp/node_modules/mysql/lib/protocol/sequences/Sequence.js:48:14)
at Query.ErrorPacket (/root/jack/www/node_modules/mysql-warp/node_modules/mysql/lib/protocol/sequences/Query.js:83:18)
at Protocol._parsePacket (/root/jack/www/node_modules/mysql-warp/node_modules/mysql/lib/protocol/Protocol.js:271:23)
at Parser.write (/root/jack/www/node_modules/mysql-warp/node_modules/mysql/lib/protocol/Parser.js:77:12)
at Protocol.write (/root/jack/www/node_modules/mysql-warp/node_modules/mysql/lib/protocol/Protocol.js:39:16)
at Socket. (/root/jack/www/node_modules/mysql-warp/node_modules/mysql/lib/Connection.js:92:28)
at emitOne (events.js:96:13)
at Socket.emit (events.js:188:7)
at readableAddChunk (_stream_readable.js:176:18)
at TCP.onread (net.js:551:20)
--------------------
at Protocol._enqueue (/root/jack/www/node_modules/mysql-warp/node_modules/mysql/lib/protocol/Protocol.js:135:48)
at PoolConnection.Connection.query (/root/jack/www/node_modules/mysql-warp/node_modules/mysql/lib/Connection.js:197:25)
at executeSQL (/root/jack/www/node_modules/mysql-warp/warp.js:46:22)
at /root/jack/www/node_modules/mysql-warp/warp.js:66:9
at Handshake.onConnect as _callback
at Handshake.Sequence.end (/root/jack/www/node_modules/mysql-warp/node_modules/mysql/lib/protocol/sequences/Sequence.js:96:24)
at Handshake.Sequence.OkPacket (/root/jack/www/node_modules/mysql-warp/node_modules/mysql/lib/protocol/sequences/Sequence.js:105:8)
at Protocol._parsePacket (/root/jack/www/node_modules/mysql-warp/node_modules/mysql/lib/protocol/Protocol.js:271:23)
at Parser.write (/root/jack/www/node_modules/mysql-warp/node_modules/mysql/lib/protocol/Parser.js:77:12)
at Protocol.write (/root/jack/www/node_modules/mysql-warp/node_modules/mysql/lib/protocol/Protocol.js:39:16)
2016-10-26T22:46:05.930Z [ERROR] 500 Error: ER_NO_SUCH_TABLE: Table 'jack.categories' doesn't exist
at Query.Sequence._packetToError (/root/jack/www/node_modules/mysql-warp/node_modules/mysql/lib/protocol/sequences/Sequence.js:48:14)
at Query.ErrorPacket (/root/jack/www/node_modules/mysql-warp/node_modules/mysql/lib/protocol/sequences/Query.js:83:18)
at Protocol._parsePacket (/root/jack/www/node_modules/mysql-warp/node_modules/mysql/lib/protocol/Protocol.js:271:23)
at Parser.write (/root/jack/www/node_modules/mysql-warp/node_modules/mysql/lib/protocol/Parser.js:77:12)
at Protocol.write (/root/jack/www/node_modules/mysql-warp/node_modules/mysql/lib/protocol/Protocol.js:39:16)
at Socket. (/root/jack/www/node_modules/mysql-warp/node_modules/mysql/lib/Connection.js:92:28)
at emitOne (events.js:96:13)
at Socket.emit (events.js:188:7)
at readableAddChunk (_stream_readable.js:176:18)
at TCP.onread (net.js:551:20)
--------------------
at Protocol._enqueue (/root/jack/www/node_modules/mysql-warp/node_modules/mysql/lib/protocol/Protocol.js:135:48)
at PoolConnection.Connection.query (/root/jack/www/node_modules/mysql-warp/node_modules/mysql/lib/Connection.js:197:25)
at executeSQL (/root/jack/www/node_modules/mysql-warp/warp.js:46:22)
at /root/jack/www/node_modules/mysql-warp/warp.js:66:9
at Handshake.onConnect as _callback
at Handshake.Sequence.end (/root/jack/www/node_modules/mysql-warp/node_modules/mysql/lib/protocol/sequences/Sequence.js:96:24)
at Handshake.Sequence.OkPacket (/root/jack/www/node_modules/mysql-warp/node_modules/mysql/lib/protocol/sequences/Sequence.js:105:8)
at Protocol._parsePacket (/root/jack/www/node_modules/mysql-warp/node_modules/mysql/lib/protocol/Protocol.js:271:23)
at Parser.write (/root/jack/www/node_modules/mysql-warp/node_modules/mysql/lib/protocol/Parser.js:77:12)
at Protocol.write (/root/jack/www/node_modules/mysql-warp/node_modules/mysql/lib/protocol/Protocol.js:39:16)

static path: /favicon.ico
[2016-10-26T22:46:07.354Z] GET /
[Cache] NOT hit: INDEX-MODEL
yield generator to fill cache...
06:46:07.358 [Warp@b81f2e1c] CONNECTION: opened from pool: 1
06:46:07.359 [Warp@b81f2e1c] SQL: select id, name, tag, description, display_order, created_at, updated_at, version from categories order by display_order
06:46:07.363 [Warp@b81f2e1c] CONNECTION: released to pool: 0
X-Execution-Time: 9
[Error] error when handle url: /
Error: ER_NO_SUCH_TABLE: Table 'jack.categories' doesn't exist
at Query.Sequence._packetToError (/root/jack/www/node_modules/mysql-warp/node_modules/mysql/lib/protocol/sequences/Sequence.js:48:14)
at Query.ErrorPacket (/root/jack/www/node_modules/mysql-warp/node_modules/mysql/lib/protocol/sequences/Query.js:83:18)
at Protocol._parsePacket (/root/jack/www/node_modules/mysql-warp/node_modules/mysql/lib/protocol/Protocol.js:271:23)
at Parser.write (/root/jack/www/node_modules/mysql-warp/node_modules/mysql/lib/protocol/Parser.js:77:12)
at Protocol.write (/root/jack/www/node_modules/mysql-warp/node_modules/mysql/lib/protocol/Protocol.js:39:16)
at Socket. (/root/jack/www/node_modules/mysql-warp/node_modules/mysql/lib/Connection.js:92:28)
at emitOne (events.js:96:13)
at Socket.emit (events.js:188:7)
at readableAddChunk (_stream_readable.js:176:18)
at TCP.onread (net.js:551:20)
--------------------
at Protocol._enqueue (/root/jack/www/node_modules/mysql-warp/node_modules/mysql/lib/protocol/Protocol.js:135:48)
at PoolConnection.Connection.query (/root/jack/www/node_modules/mysql-warp/node_modules/mysql/lib/Connection.js:197:25)
at executeSQL (/root/jack/www/node_modules/mysql-warp/warp.js:46:22)
at /root/jack/www/node_modules/mysql-warp/warp.js:66:9
at Ping.onPing as _callback
at Ping.Sequence.end (/root/jack/www/node_modules/mysql-warp/node_modules/mysql/lib/protocol/sequences/Sequence.js:96:24)
at Ping.Sequence.OkPacket (/root/jack/www/node_modules/mysql-warp/node_modules/mysql/lib/protocol/sequences/Sequence.js:105:8)
at Protocol._parsePacket (/root/jack/www/node_modules/mysql-warp/node_modules/mysql/lib/protocol/Protocol.js:271:23)
at Parser.write (/root/jack/www/node_modules/mysql-warp/node_modules/mysql/lib/protocol/Parser.js:77:12)
at Protocol.write (/root/jack/www/node_modules/mysql-warp/node_modules/mysql/lib/protocol/Protocol.js:39:16)
2016-10-26T22:46:07.363Z [ERROR] 500 Error: ER_NO_SUCH_TABLE: Table 'jack.categories' doesn't exist
at Query.Sequence._packetToError (/root/jack/www/node_modules/mysql-warp/node_modules/mysql/lib/protocol/sequences/Sequence.js:48:14)
at Query.ErrorPacket (/root/jack/www/node_modules/mysql-warp/node_modules/mysql/lib/protocol/sequences/Query.js:83:18)
at Protocol._parsePacket (/root/jack/www/node_modules/mysql-warp/node_modules/mysql/lib/protocol/Protocol.js:271:23)
at Parser.write (/root/jack/www/node_modules/mysql-warp/node_modules/mysql/lib/protocol/Parser.js:77:12)
at Protocol.write (/root/jack/www/node_modules/mysql-warp/node_modules/mysql/lib/protocol/Protocol.js:39:16)
at Socket. (/root/jack/www/node_modules/mysql-warp/node_modules/mysql/lib/Connection.js:92:28)
at emitOne (events.js:96:13)
at Socket.emit (events.js:188:7)
at readableAddChunk (_stream_readable.js:176:18)
at TCP.onread (net.js:551:20)
--------------------
at Protocol._enqueue (/root/jack/www/node_modules/mysql-warp/node_modules/mysql/lib/protocol/Protocol.js:135:48)
at PoolConnection.Connection.query (/root/jack/www/node_modules/mysql-warp/node_modules/mysql/lib/Connection.js:197:25)
at executeSQL (/root/jack/www/node_modules/mysql-warp/warp.js:46:22)
at /root/jack/www/node_modules/mysql-warp/warp.js:66:9
at Ping.onPing as _callback
at Ping.Sequence.end (/root/jack/www/node_modules/mysql-warp/node_modules/mysql/lib/protocol/sequences/Sequence.js:96:24)
at Ping.Sequence.OkPacket (/root/jack/www/node_modules/mysql-warp/node_modules/mysql/lib/protocol/sequences/Sequence.js:105:8)
at Protocol._parsePacket (/root/jack/www/node_modules/mysql-warp/node_modules/mysql/lib/protocol/Protocol.js:271:23)
at Parser.write (/root/jack/www/node_modules/mysql-warp/node_modules/mysql/lib/protocol/Parser.js:77:12)
at Protocol.write (/root/jack/www/node_modules/mysql-warp/node_modules/mysql/lib/protocol/Protocol.js:39:16)
static path: /favicon.ico
[2016-10-26T22:46:39.856Z] GET /
[Cache] NOT hit: INDEX-MODEL
yield generator to fill cache...
06:46:39.859 [Warp@b81f2e1c] CONNECTION: opened from pool: 1
06:46:39.859 [Warp@b81f2e1c] SQL: select id, name, tag, description, display_order, created_at, updated_at, version from categories order by display_order
06:46:39.860 [Warp@b81f2e1c] CONNECTION: released to pool: 0
X-Execution-Time: 5
[Error] error when handle url: /
Error: ER_NO_SUCH_TABLE: Table 'jack.categories' doesn't exist
at Query.Sequence._packetToError (/root/jack/www/node_modules/mysql-warp/node_modules/mysql/lib/protocol/sequences/Sequence.js:48:14)
at Query.ErrorPacket (/root/jack/www/node_modules/mysql-warp/node_modules/mysql/lib/protocol/sequences/Query.js:83:18)
at Protocol._parsePacket (/root/jack/www/node_modules/mysql-warp/node_modules/mysql/lib/protocol/Protocol.js:271:23)
at Parser.write (/root/jack/www/node_modules/mysql-warp/node_modules/mysql/lib/protocol/Parser.js:77:12)
at Protocol.write (/root/jack/www/node_modules/mysql-warp/node_modules/mysql/lib/protocol/Protocol.js:39:16)
at Socket. (/root/jack/www/node_modules/mysql-warp/node_modules/mysql/lib/Connection.js:92:28)
at emitOne (events.js:96:13)
at Socket.emit (events.js:188:7)
at readableAddChunk (_stream_readable.js:176:18)
at TCP.onread (net.js:551:20)
--------------------
at Protocol._enqueue (/root/jack/www/node_modules/mysql-warp/node_modules/mysql/lib/protocol/Protocol.js:135:48)
at PoolConnection.Connection.query (/root/jack/www/node_modules/mysql-warp/node_modules/mysql/lib/Connection.js:197:25)
at executeSQL (/root/jack/www/node_modules/mysql-warp/warp.js:46:22)
at /root/jack/www/node_modules/mysql-warp/warp.js:66:9
at Ping.onPing as _callback
at Ping.Sequence.end (/root/jack/www/node_modules/mysql-warp/node_modules/mysql/lib/protocol/sequences/Sequence.js:96:24)
at Ping.Sequence.OkPacket (/root/jack/www/node_modules/mysql-warp/node_modules/mysql/lib/protocol/sequences/Sequence.js:105:8)
at Protocol._parsePacket (/root/jack/www/node_modules/mysql-warp/node_modules/mysql/lib/protocol/Protocol.js:271:23)
at Parser.write (/root/jack/www/node_modules/mysql-warp/node_modules/mysql/lib/protocol/Parser.js:77:12)
at Protocol.write (/root/jack/www/node_modules/mysql-warp/node_modules/mysql/lib/protocol/Protocol.js:39:16)
2016-10-26T22:46:39.861Z [ERROR] 500 Error: ER_NO_SUCH_TABLE: Table 'jack.categories' doesn't exist
at Query.Sequence._packetToError (/root/jack/www/node_modules/mysql-warp/node_modules/mysql/lib/protocol/sequences/Sequence.js:48:14)
at Query.ErrorPacket (/root/jack/www/node_modules/mysql-warp/node_modules/mysql/lib/protocol/sequences/Query.js:83:18)
at Protocol._parsePacket (/root/jack/www/node_modules/mysql-warp/node_modules/mysql/lib/protocol/Protocol.js:271:23)
at Parser.write (/root/jack/www/node_modules/mysql-warp/node_modules/mysql/lib/protocol/Parser.js:77:12)
at Protocol.write (/root/jack/www/node_modules/mysql-warp/node_modules/mysql/lib/protocol/Protocol.js:39:16)
at Socket. (/root/jack/www/node_modules/mysql-warp/node_modules/mysql/lib/Connection.js:92:28)
at emitOne (events.js:96:13)
at Socket.emit (events.js:188:7)
at readableAddChunk (_stream_readable.js:176:18)
at TCP.onread (net.js:551:20)
--------------------
at Protocol._enqueue (/root/jack/www/node_modules/mysql-warp/node_modules/mysql/lib/protocol/Protocol.js:135:48)
at PoolConnection.Connection.query (/root/jack/www/node_modules/mysql-warp/node_modules/mysql/lib/Connection.js:197:25)
at executeSQL (/root/jack/www/node_modules/mysql-warp/warp.js:46:22)
at /root/jack/www/node_modules/mysql-warp/warp.js:66:9
at Ping.onPing as _callback
at Ping.Sequence.end (/root/jack/www/node_modules/mysql-warp/node_modules/mysql/lib/protocol/sequences/Sequence.js:96:24)
at Ping.Sequence.OkPacket (/root/jack/www/node_modules/mysql-warp/node_modules/mysql/lib/protocol/sequences/Sequence.js:105:8)
at Protocol._parsePacket (/root/jack/www/node_modules/mysql-warp/node_modules/mysql/lib/protocol/Protocol.js:271:23)
at Parser.write (/root/jack/www/node_modules/mysql-warp/node_modules/mysql/lib/protocol/Parser.js:77:12)
at Protocol.write (/root/jack/www/node_modules/mysql-warp/node_modules/mysql/lib/protocol/Protocol.js:39:16)
static path: /favicon.ico

This is the log. please help to solve. Thx

关于 博文 词式书写 的 建议

廖雪峰 老师 你好 :

请问 您 尝试 过 词式 书写 吗 ?词式 书写 是 一种 将 句子 中 的 词汇 用 空格 分割 开来 的 书写 方式 , 相比 中文 传统 书写 方式 , 词式 书写 能够 极大 提高 读者 阅读 体验 。

当 我们 书写 时 , 书写 的 最小 单位 是 词汇 , 当 我们 阅读 时 , 阅读 的 最小 单位 也 是 词汇 。 一篇 未经 分词 书写 的 文章 从 写作 到 阅读 , 文章 的 信息 就 像是 经过 了 压缩 - 解压 。 显然 , 将 词汇 挤 凑在一起 的 书写 格式 是 多余 的 。 词式 书写 能 更好 传达 出 作者 的 意图 , 读者 的 阅读 负担 也 更 小 了 ( 无需 在 脑中 进行 分词 ) 。

与 大多数 人 想象 的 不 一样 , 很多 西语 一 开始 也 不是 分词 书写 的 。 同样 的 , 我们 现在 所 使用 的 只有 100 多年 历史 的 白话文 并 不 完美 。 在 中文 引进 标点符号 之前 , ** 的 读者 们 甚至 需要 在 脑海中 自行 进行 断句 。

那么 我 想 , 作为 汉字 的 使用者 , 我们 有 理由 探索 新 的 书写 方式 , 让 ** 读者 在 阅读 的 时候 , 既 不 需要 自行 断句 , 也 不 需要 自行 分词 。

至于 阅读 习惯 问题 , 习惯 是 很 容易 改变 的 。 如果 新 的 习惯 能 让 读者 在 阅读 时 更 省时省力 , 那么 我们 有 理由 推测 , 它 将 很快 取代 旧习惯 。 正如 现代 ** 人 很少 会 再 去 阅读 竖排 书 和 没有 标点符号 的 文章 一样 。

您 有 意向 在 您 的 下 一篇 博文 中 采用 词式 书写 吗 ?

这是 我的 微博:https://weibo.com/u/6475545196/home?topnav=1&wvr=6

词式书写 豆瓣兴趣小组:https://www.douban.com/group/639435/

For generated all.css failed when production

root@cdn-jp:/srv/kbckc/www# npm install gulp
npm WARN deprecated [email protected]: please upgrade to graceful-fs 4 for compatibility with current and future versions of Node.js
npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated [email protected]: please upgrade to graceful-fs 4 for compatibility with current and future versions of Node.js
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

I tried update so many times, but not work.

Is it my way wrong to generate all.css, all.js?

SyntaxError: Unexpected token function

[root@cdn-jp www]# node —harmony app.js
/home/itranswarp.js/www/node_modules/koa-bodyparser/index.js:69
return async function bodyParser(ctx, next) {
^^^^^^^^
SyntaxError: Unexpected token function
at Object.exports.runInThisContext (vm.js:76:16)
at Module._compile (module.js:542:28)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at require (internal/module.js:20:19)
at Object. (/home/itranswarp.js/www/app.js:12:18)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)

@michaelliao

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.