File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ # Forge-Node-Starter
2+ Starter Repo for node express server including database service layer on top of knex with postgres
3+
4+ The express-server-lib exposes below methods that can be used to spin up multiple servers
5+
6+ ```
7+ import { Options, ServerApp } from "../express-server-lib";
8+
9+ const serverName = "Server";
10+
11+ const serverPort: number = config.get(`${serverName}.port`);
12+
13+ const expressOptions: Options = {
14+ serverName,
15+ enableGlobalRateLimiter: config.get(`${serverName}.enableGlobalRateLimit`),
16+ port: serverPort,
17+ cors: { disable: true },
18+ securityHeaders: {
19+ disableAll: true,
20+ },
21+ };
22+ const apiServer = new ServerApp(expressOptions);
23+
24+ ```
25+ This will spin up server with default configuration of middlewares like cors and security headers
You can’t perform that action at this time.
0 commit comments