mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-15 04:10:32 +00:00
22 lines
450 B
JavaScript
22 lines
450 B
JavaScript
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;
|