appjs desktop
| /* | |
| author: daimajia | |
| name: appjs Express example | |
| email: daimajia@gmail.com | |
| any question feel free to email me :) | |
| */ | |
| var appjs = module.exports = require('appjs'); | |
| var express = require('express'); | |
| var utils = require('util');// Create express server for routing | |
| appjs.serveFilesFrom(__dirname + '/content'); | |
| var appRouter = express(); | |
| /* | |
| *This is default views jade files directory. | |
| *Remeber to create a index.jade file in this directory. | |
| */ | |
| appRouter.set('views',__dirname + '/content'); | |
| appRouter.use(express.bodyParser()); | |
| appRouter.engine('jade', require('jade').__express); | |
| appRouter.engine('html', require('ejs').renderFile); | |
| /** | |
| * Set up the express routes | |
| */ | |
| appRouter.get('/', function(req, res, next){ | |
| res.render('index.jade', { name: 'Hello Jade!' }); | |
| }); | |
| appRouter.use(express.static(__dirname + '/content')); | |
| /** | |
| * Setup AppJS | |
| */ | |
| // override AppJS's built in request handler with connect | |
| appjs.router.handle = appRouter.handle.bind(appRouter); | |
| // have express listen on a port:51686 | |
| appRouter.listen(23453); | |
| var window = appjs.createWindow('http://localhost:23453/', { | |
| width : 640, | |
| height: 460, | |
| icons : __dirname + '/content/icons' | |
| }); | |
| window.on('create', function(){ | |
| console.log("Window Created"); | |
| window.frame.show(); | |
| window.frame.center(); | |
| }); | |
| window.on('ready', function(){ | |
| window.require = require; | |
| window.process = process; | |
| window.module = module; | |
| }); |
appjs desktop的更多相关文章
- Power BI官方视频(3) Power BI Desktop 8月份更新功能概述
Power BI Desktop 8月24日发布了更新版本.现将更新内容翻译整理如下,可以根据后面提供的链接下载最新版本使用. 1.主要功能更新 1.1 数据钻取支持在线版 以前的desktop中进行 ...
- Windows下Redis缓存服务器的使用 .NET StackExchange.Redis Redis Desktop Manager
Redis缓存服务器是一款key/value数据库,读110000次/s,写81000次/s,因为是内存操作所以速度飞快,常见用法是存用户token.短信验证码等 官网显示Redis本身并没有Wind ...
- [转] 给ubuntu中的软件设置desktop快捷方式(以android studio为例)
原文链接:http://www.cnblogs.com/kinyoung/p/4493472.html ubuntu的快捷方式都在/usr/share/applications/路径下有很多*.des ...
- 安装ArcGIS Desktop 9.3
本文仅用于学习交流,商业用途请支持正版!转载请注明: http://www.cnblogs.com/mxbs/p/6216865.html 准备: ArcGIS Desktop 9.3.crack_f ...
- ubuntu 14.04 desktop装vnc4server
ubuntu 14.04 desktop上安装vnc4server要装上gnome的一些软件包并修改启动文件~/.vnc/xstartup 问题来源How to make VNC Server wor ...
- 【GitHub Desktop】MacOS和Win下配置及简单的使用
一. GitHub介绍 1.GitHub 是为开发者提供 Git 仓库的托管服务.这是一个让开发者与朋友.同事.同学及陌生人共享代码的完美场所. 总结一下,GitHub 最大的特征是"面向人 ...
- GitHub Desktop+码云(GIT.oschina)使用方法
一.如何从码云GIT导入到GitHubDeskTop桌面工具. 1.先用命令行切换到本地的目录. 2.使用git clone 码云GIT地址 命令将项目克隆到本地. 3.在GitHub Desktop ...
- Local Desktop
Desktop: Paradigm System I:\Apps\Admin\ParaStart.bat Paradigm 1 Report Menu I:\Apps\Admin\ParaStart ...
- Remote Desktop Connection Manager
通过Remote Desktop Connection Manager(RDCMan),当前最新版本是 v2.7. 通过这款软件,我们便可以轻松的管理和访问数个RDP.左边的列表中我们可以创建总的分区 ...
随机推荐
- maven初试2
1.1.建立Hello项目 1.首先建立Hello项目,同时建立Maven约定的目录结构和pom.xml文件 Hello | --src | -----main | ----------java | ...
- Python学习笔记4—列表
列表定义 >>> a=['] >>> type(a) <type 'list'> >>> bool(a) #列表有值,则为true T ...
- redhat 6.4 yum 本地配置简记
准备工作 ----------------------------------------------------------------------------- 1. 加载光驱 将iso镜像文件 ...
- phalcon: 资源文件管 理 引入css,js
<?php class IndexController extends Phalcon\Mvc\Controller { public function index() { //添加本地css资 ...
- Linux下数据库的安装和使用
数据库有多重要就不用说了,每一个计算机相关行业的人都必须要学会基本的数据库操作,因为你总会用到的. 之前转过一些学习资源: 与MySQL的零距离接触 - 慕课网 Python操作MySQL数据库 生物 ...
- ios 修改导航条返回按钮
ios 修改导航条返回按钮 方式一:使用系统的:可以更改系统的文字:以及通过设置导航条的颜色来达到预期的效果 UIBarButtonItem *backBtns = [[UIBarButtonItem ...
- 应用 Middleware
主要应用场景:过滤HTTP请求 laravel本身自带了几个Middleware在app/http/middleware目录下面 然后在app/http/kernel.php中注册 自定义一个midd ...
- CFX客户端调用报错
Exception in thread "main" javax.xml.ws.soap.SOAPFaultException: Unmarshalling Error: unex ...
- PowerDesigner使用教程|使用方法
PowerDesigner安装方法: http://dev.firnow.com/course/3_program/java/javajs/20090908/174375.html 安装完这2个软件 ...
- hdu----(3118)Arbiter(构造二分图)
Arbiter Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others)Total S ...