高效轻量的 web 开发框架 doJS
- 授权协议: GPL
- 开发语言: JavaScript
- 操作系统: 跨平台
- 软件首页: https://node.doui.cc/
- 软件文档: https://node.doui.cc/
软件介绍
doJS 是一个基于 Node.js 平台,高效、开放、极轻量的 Web 开发框架。它提供一系列强大的特性,帮助你创建各种 Web 和移动设备应用。
doJS 不对 Node.js 已有的特性进行二次抽象,我们只是在它之上扩展了 Web 应用所需的基本功能, 使之使用上更加简便。
丰富实用的http快捷方法,这里没有中间件的概念,没有晦涩的专业术语,有的只是最大众化的表述。只要5分钟,就能上手。
让世界不再有难写的web应用。
doJS框架融合了PHP的一些简洁的特性,以及一些优秀的框架/应用的特点,特别是yaf和smarty。让开发者专注于业务逻辑的开发,不再为那些路由,伪静态等烦恼。
启用方法(步骤)
注 本框架和用法 都是在 Linux 或者 Mac 下面测试通过。至于使用 Windows 并坚持玩新技术的同学,我坚信他们一定有着过人的、甚至是不可告人的兼容性 bug 处理能力,所以这部分同学麻烦在安装过程无法继续时,自行兼容一下
下载doJS框架, 拷贝到任意目录。
添加nginx配置(使用其他web服务,如apache的童鞋,请自行根据所使用的web服务器语法改写强烈推荐nginx), 路径啥的自行根据自己的机器修改
upstream dojs_upstream {
server 127.0.0.1:3000;
#server 127.0.0.1:3005;
keepalive 64;
}
server {
listen 80;
server_name dojs.cc;
index index.html index.htm;
root /www/dojs.cc/public;
location ~ ^/(images/|js/|css/|cache/|favicon.ico|robots.txt) {
expires 1d;
access_log off;
}
location / {
try_files $uri
@proxy;
}
location @proxy {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_set_header X-NginX-Proxy true;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_http_version 1.1;
proxy_max_temp_file_size 0;
proxy_pass http://dojs_upstream;
proxy_redirect off;
proxy_read_timeout 240s;
}
}配置框架
建立启动文件, 如app.js
"use strict";
var app = new (require('dojs'))(__dirname + '/')
app.use('website', 'www.your_domain.com')
app.use('domain', 'your_domain.com') //设置域,cookie用到,默认等于website
app.use('port', 3004) //设置端口,默认3000
app.start()其他的配置, 请参考dojs模块下的lib目录里的 config.js文件
启动应用。在项目根目录打开终端, 输入以下命令
./bin/dojs start, 然后根据提示操作, 即可
$ cd /www/your_domain.com/
$ ./bin/dojs
使用以下指令: ./bin/dojs {start|stop|status|restart|delete}
$ ./bin/dojs startEnjoy you web
Introduction to Computation and Programming Using Python
John V. Guttag / The MIT Press / 2013-7 / USD 25.00
This book introduces students with little or no prior programming experience to the art of computational problem solving using Python and various Python libraries, including PyLab. It provides student......一起来看看 《Introduction to Computation and Programming Using Python》 这本书的介绍吧!
