Guest User

Untitled

a guest
Aug 14th, 2018
164
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. var express = require('express'),
  2. app = express(),
  3. chalk = require('chalk'),
  4. debug = require('debug')('app'),
  5. morgan = require('morgan'),
  6. path = require('path'),
  7. mysql= require('mysql'),
  8. PORT = process.env.PORT || 3000;
  9.  
  10. var knex = require('knex')({
  11. client: 'mysql',
  12. connection: {
  13. host : 'sql12.freemysqlhosting.net',
  14. user : 'sql12252060',
  15. password : 'ZhgGIqD133',
  16. database : 'sql12252060'
  17. }
  18. });
  19.  
  20. knex.schema.withSchema('sql12252060').createTable('player', function (table) {
  21. console.log('table')
  22. })
  23.  
  24.  
  25. app.use(morgan('tiny'));
  26.  
  27. app.get('/', (req, res) => {
  28. res.send('dd')
  29. });
  30.  
  31.  
  32. app.listen(PORT, () => {
  33. debug(`listing to ${chalk.red(PORT)}`);
  34.  
  35. });
Add Comment
Please, Sign In to add comment