Skip to content

Instantly share code, notes, and snippets.

@adamhalasz
Last active August 29, 2015 14:00
Show Gist options
  • Save adamhalasz/fc3c2fab9e8dd9357d43 to your computer and use it in GitHub Desktop.
Save adamhalasz/fc3c2fab9e8dd9357d43 to your computer and use it in GitHub Desktop.
diet subdomain
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