Bansari Akhani commited on
Commit
0000bf5
·
1 Parent(s): c23ed3b
Files changed (12) hide show
  1. .editorconfig +10 -0
  2. .env +1 -0
  3. .eslintrc.cjs +33 -0
  4. .gitattributes +4 -0
  5. .gitignore +13 -0
  6. .prettierrc +8 -0
  7. .yarnrc.yml +1 -0
  8. dist/app.js +14 -0
  9. package.json +29 -0
  10. src/app.ts +12 -0
  11. tsconfig.json +13 -0
  12. yarn.lock +0 -0
.editorconfig ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ root = true
2
+
3
+ [*]
4
+ end_of_line = lf
5
+ insert_final_newline = true
6
+
7
+ [*.{js,json,yml}]
8
+ charset = utf-8
9
+ indent_style = space
10
+ indent_size = 2
.env ADDED
@@ -0,0 +1 @@
 
 
1
+ PORT=3000
.eslintrc.cjs ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ module.exports = {
2
+ root: true,
3
+ env: { node: true, es2020: true },
4
+ extends: [
5
+ "eslint:recommended",
6
+ "plugin:@typescript-eslint/recommended",
7
+ "prettier",
8
+ "plugin:import/recommended",
9
+ "plugin:import/typescript",
10
+ ],
11
+ ignorePatterns: ["build", ".eslintrc.cjs"],
12
+ parser: "@typescript-eslint/parser",
13
+ plugins: ["prettier"],
14
+ rules: {
15
+ "import/order": [
16
+ "error",
17
+ {
18
+ "newlines-between": "always",
19
+ alphabetize: {
20
+ order: "asc",
21
+ caseInsensitive: false,
22
+ },
23
+ groups: [
24
+ ["builtin", "external"],
25
+ "internal",
26
+ ["index", "sibling", "parent"],
27
+ "object",
28
+ "type",
29
+ ],
30
+ },
31
+ ],
32
+ },
33
+ };
.gitattributes ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ /.yarn/** linguist-vendored
2
+ /.yarn/releases/* binary
3
+ /.yarn/plugins/**/* binary
4
+ /.pnp.* binary linguist-generated
.gitignore ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .yarn/*
2
+ !.yarn/patches
3
+ !.yarn/plugins
4
+ !.yarn/releases
5
+ !.yarn/sdks
6
+ !.yarn/versions
7
+
8
+ # Swap the comments on the following lines if you wish to use zero-installs
9
+ # In that case, don't forget to run `yarn config set enableGlobalCache false`!
10
+ # Documentation here: https://yarnpkg.com/features/caching#zero-installs
11
+
12
+ #!.yarn/cache
13
+ .pnp.*
.prettierrc ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "printWidth": 100,
3
+ "arrowParens": "always",
4
+ "bracketSpacing": true,
5
+ "tabWidth": 2,
6
+ "trailingComma": "es5",
7
+ "semi": true
8
+ }
.yarnrc.yml ADDED
@@ -0,0 +1 @@
 
 
1
+ nodeLinker: pnp
dist/app.js ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const express_1 = __importDefault(require("express"));
7
+ const app = (0, express_1.default)();
8
+ const port = 3000;
9
+ app.get('/', (req, res) => {
10
+ res.send('Hello World!');
11
+ });
12
+ app.listen(port, () => {
13
+ console.log(`Example app listening at http://localhost:${port}`);
14
+ });
package.json ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "fb-api",
3
+ "main": "app.ts",
4
+ "packageManager": "yarn@4.2.2",
5
+ "dependencies": {
6
+ "dotenv": "^16.4.5",
7
+ "express": "^4.19.2",
8
+ "ts-node": "^10.9.2"
9
+ },
10
+ "devDependencies": {
11
+ "@types/dotenv": "^8.2.0",
12
+ "@types/express": "^4.17.21",
13
+ "@types/node": "^20.14.10",
14
+ "@typescript-eslint/eslint-plugin": "^7.16.0",
15
+ "@typescript-eslint/parser": "^7.16.0",
16
+ "eslint": "^9.6.0",
17
+ "eslint-config-prettier": "^9.1.0",
18
+ "eslint-plugin-prettier": "^5.1.3",
19
+ "nodemon": "^3.1.4",
20
+ "prettier": "^3.3.2",
21
+ "typescript": "^5.5.3"
22
+ },
23
+ "scripts": {
24
+ "lint": "eslint . --ext ts --report-unused-disable-directives --max-warnings 0",
25
+ "dev": "nodemon src/app.ts",
26
+ "start": "tsc && node build/app.js",
27
+ "build": "tsc"
28
+ }
29
+ }
src/app.ts ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import express from 'express';
2
+
3
+ const app = express();
4
+ const port = 3000;
5
+
6
+ app.get('/', (req, res) => {
7
+ res.send('Hello World!');
8
+ });
9
+
10
+ app.listen(port, () => {
11
+ console.log(`Example app listening at http://localhost:${port}`);
12
+ });
tsconfig.json ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ES6",
4
+ "module": "commonjs",
5
+ "strict": true,
6
+ "esModuleInterop": true,
7
+ "skipLibCheck": true,
8
+ "forceConsistentCasingInFileNames": true,
9
+ "outDir": "./dist"
10
+ },
11
+ "include": ["./**/*.ts"],
12
+ "exclude": ["node_modules"]
13
+ }
yarn.lock ADDED
The diff for this file is too large to render. See raw diff