Skip to content

Commit 806109e

Browse files
authored
Merge pull request #54 from ejkorol/dev
remove vercel config
2 parents 2db4b4c + f67b85c commit 806109e

File tree

6 files changed

+6
-19
lines changed

6 files changed

+6
-19
lines changed

api/index.ts

-3
This file was deleted.

package.json

+3-4
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,12 @@
22
"name": "recipe-book",
33
"version": "1.0.0",
44
"description": "An open-source Minecraft API",
5-
"main": "src/api.ts",
5+
"main": "dist/src/api.js",
66
"scripts": {
77
"build": "tsc",
8-
"start": "ts-node src/api.ts",
8+
"start": "node dist/src/api.js",
99
"dev": "nodemon src/api.ts",
10-
"seed": "ts-node ./src/seed/seed.ts",
11-
"vercel-build": "echo booted"
10+
"seed": "ts-node ./src/seed/seed.ts"
1211
},
1312
"dependencies": {
1413
"@prisma/client": "^5.17.0",

src/api.ts

-2
Original file line numberDiff line numberDiff line change
@@ -52,5 +52,3 @@ api.use(errorHandler);
5252
api.listen(PORT, () => {
5353
console.log(`API is listening on port: ${PORT}`);
5454
});
55-
56-
export default api;

src/routes/index.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ const router = Router();
1414
* `./src/api.ts` then imports whatever is generated.
1515
*/
1616

17-
const routesDir = __dirname
17+
const routesDir = path.resolve(__dirname);
1818

1919
fs.readdirSync(routesDir).forEach(file => {
20-
if (file !== 'index.js' && (file.endsWith('.ts') || file.endsWith('.js'))) {
20+
if (file !== 'index.js' && file !== 'index.ts' && (file.endsWith('.ts') || file.endsWith('.js'))) {
2121
const routePath = `/api/${file.replace('.ts', '').replace('.js', '').replace(/Routes$/, '').toLowerCase()}`;
2222

2323
try {

tsconfig.json

+1-4
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,5 @@
88
"forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */
99
"strict": true, /* Enable all strict type-checking options. */
1010
"skipLibCheck": true /* Skip type checking all .d.ts files. */
11-
},
12-
"include" : [
13-
"./api/*.ts"
14-
]
11+
}
1512
}

vercel.json

-4
This file was deleted.

0 commit comments

Comments
 (0)