mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-16 21:00:31 +00:00
Initial commit.
This commit is contained in:
21
server/server.js
Normal file
21
server/server.js
Normal file
@@ -0,0 +1,21 @@
|
||||
import path from 'path';
|
||||
import dotenv from 'dotenv';
|
||||
import errorHandler from 'errorhandler';
|
||||
import app from './http/app';
|
||||
|
||||
dotenv.config({
|
||||
path: path.join(__dirname, '.env')
|
||||
});
|
||||
|
||||
app.use(errorHandler);
|
||||
|
||||
const server = app.listen(app.get('port'), () => {
|
||||
console.log(
|
||||
" App is running at http://localhost:%d in %s mode",
|
||||
app.get("port"),
|
||||
app.get("env")
|
||||
);
|
||||
console.log(" Press CTRL-C to stop\n");
|
||||
});
|
||||
|
||||
export default server;
|
||||
Reference in New Issue
Block a user