Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var express = require('express');
- var bodyParser = require('body-parser');
- var app = express();
- var fs = require('fs');
- var mysql = require('mysql');
- var connection = mysql.createConnection({
- host: 'localhost',
- user: 'root',
- password: 'root',
- database: 'NotFB'
- });
- connection.connect(function(err){
- if(err) throw err;
- console.log('you are now connected... ');
- })
- ;
- app.use(bodyParser.json());
- app.use(bodyParser.urlencoded({
- extended: true
- }));
- app.use(express.static(__dirname + '/public'));
- app.listen(10001, "0.0.0.0",function() {
- //var host = server.address();
- console.log('server listening on port ' + 10001);
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement