Skip to content

Instantly share code, notes, and snippets.



Last active Dec 27, 2015
What would you like to do?
Serving html from restify!
"name": "7271849",
"version": "0.0.1",
"description": "A sample application that shows how to serve static file using restify.",
"main": "api.js",
"dependencies": {
"restify": "~2.6.0"
"devDependencies": {},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"start": "node server.js"
"repository": {
"type": "git",
"url": ""
"keywords": [
"author": "Mushfiq-E Mahabub",
"license": "wtfpl",
"gitHead": "2c8e160f865cc11b2b09a5681b220c442a47ab17",
"bugs": {
"url": ""
var restify = require('restify');
var server = restify.createServer();
server.get(/.*/, restify.serveStatic({
'directory': '.',
'default': 'index.html'
server.listen(8080, function() {
console.log('%s listening at %s',, server.url);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.