Skip to content
Permalink
master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
var express = require('express');
var api = require('api');
var cors = require('cors');
var app = express();
// Import Constants
const consts = require('config');
var appConfig = consts.appConfig();
// Allow cross origin resource sharing
app.use(cors());
/**
* Set up port to listen on
*/
var server = app.listen(appConfig.portNumber, function() {
console.log('Server started on port: ' + appConfig.portNumber);
});
/**
* Import Api file
*/
app.use('/api/v1', api);
/**
* Catch any uncaught errors on server and log them
*/
process.on('uncaughtException', function(err) {
// Log Error
console.log(err);
});
module.exports = server;