index.js
513 Bytes
var express = require('express')
var app = express()
var mysql = require('mysql')
var router = express.Router();
var path = require('path')
var passport = require('passport')
var LocalStrategy = require('passport-local').Strategy;
var connection = mysql.createConnection({
host: 'localhost',
port: 3306,
user: 'root',
password: 'ksmhjh88',
database: 'nodetest'
})
connection.connect()
router.get('/', function (req, res) {
res.render('gps.ejs');
})
module.exports = router;