0.5.1 • Published 11 years ago

quick-server v0.5.1

Weekly downloads
175
License
-
Repository
github
Last release
11 years ago

####Quick-Server Is a small web server stub for NodeJS/Express/Hogan and can be run directly or require'd into a script.
Uses Express, Hogan-Express templates, allows you to set port, catch errors, app path, statics the current directory, without all the boilerplate.

Allows use of server and client JS in the same script, separated by the delimiter /*/
Server code is loaded in, client code is usable by fetching the file renamed client-
instead of server-*.

###A single page web app

$ cd test
$ node myapp
require('quick-server')(function(options, app){
	app.all('/', function(r,s){
		...
	})
})

JS files that start with server- are automatically required in. These files may contain client JS as well after the delimiter /**/

server-some.js

module.exports = function(options, app){
	console.log('Hi, I am the server code');
}
/**/
function clientjs(){
	document.write('Hi, I am written from client JS');
}

index.html

<script src='client-some.js'></script>
<script>
   clientjs();
</script>

###Running the script directly

$ node server
or
$ apppath=./myapplication node server

###Options

$ errors=1 apppath=./myapppath port=8080 node server
$ errors=1 apppath=./myapppath port=8080 node myapp

// errors will set node to catch all uncaught application errors
0.5.1

11 years ago

0.5.0

11 years ago

0.4.9

11 years ago

0.4.8

11 years ago

0.4.7

11 years ago

0.4.6

11 years ago

0.4.5

11 years ago

0.4.4

11 years ago

0.4.3

11 years ago

0.4.2

11 years ago

0.4.1

11 years ago

0.4.0

11 years ago

0.3.15

11 years ago

0.3.14

11 years ago

0.3.13

11 years ago

0.3.12

11 years ago

0.3.11

11 years ago

0.3.10

11 years ago

0.3.9

11 years ago

0.3.8

11 years ago

0.3.7

11 years ago

0.3.6

11 years ago

0.3.5

11 years ago

0.3.3

11 years ago

0.3.2

11 years ago

0.3.1

11 years ago

0.3.0

11 years ago

0.2.2

11 years ago

0.2.1

11 years ago

0.1.5

11 years ago

0.1.4

11 years ago

0.1.3

11 years ago

0.1.2

11 years ago

0.1.1

11 years ago

0.1.0

11 years ago

0.0.8

11 years ago

0.0.7

11 years ago

0.0.6

11 years ago

0.0.5

11 years ago

0.0.4

11 years ago

0.0.3

11 years ago

0.0.2

11 years ago

0.0.1

11 years ago