UNPKG

backend-setup-tool

Version:

A powerful CLI tool to instantly scaffold a clean and scalable Node.js/Express.js backend for SQL or NoSQL projects.

20 lines (15 loc) 461 B
import express from "express"; import { createServer } from "http"; import { GLOBAL_ENV } from "./config/global-config.js"; import loaders from "./loaders/index.js"; const app = express(); const httpServer = createServer(app); loaders(app, httpServer); httpServer.listen(GLOBAL_ENV.port, (error) => { if (error) { console.error(`Error: ${error}`); return; } console.log(`Server is running on port ${GLOBAL_ENV.port}`); }); export default app;