Catppuccin Latte
EXPLORER
OUTLINE
PROJECT-NAME
public
src
database.ts
index.ts
.gitignore
README.md
package.json
index.ts
README.md
01
02
03
04
05
06
07
08
09
10
11
12
13
14
15
16
17
import path from 'path';
import { createDB } from './database';
const { PORT } = process.env; // Get environment variables.
const validExt = (p) => /\.[a-z0-9]{1,4}$/i.test(p);
/**
* Application factory.
* @return {App} Application instance
*/
async function createApp(config: Config): App {
return new App({
port: Number(env.PORT ?? 8000),
db: await createDB(config.db),
...config.app,
});
}
0 0
Ln 46, Col: 20
Spaces: 4
UTF-8
LF
JavaScript