Last active
August 29, 2015 14:00
-
-
Save adamhalasz/fc3c2fab9e8dd9357d43 to your computer and use it in GitHub Desktop.
diet subdomain
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
subdomain = app.subdomain(app, { | |
domain : 'subdomain.example.com', | |
path : __dirname, | |
public : __dirname+'/resources', | |
mysql : { | |
host : 'YOUR_HOST', // usually localhost | |
user : 'YOUR_USERNAME', // usually root | |
password : 'YOUR_PASSWORD', // your mysql password | |
database : 'YOUR_DATABASE_NAME', // your mysql database | |
}, | |
}); | |
// Listen on http://subdomain.example.com/ | |
subdomain.get('/', function(request, response, mysql){ | |
response.end('hello world!'); | |
mysql.end(); | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment