project scaffolding

This commit is contained in:
nai-degen 2023-04-08 02:34:21 -05:00 committed by nai-degen
parent d1d9e03c5f
commit d98ae67c91
6 changed files with 1458 additions and 0 deletions

1
.gitignore vendored
View File

@ -1,2 +1,3 @@
.vscode
build
node_modules

13
Dockerfile Normal file
View File

@ -0,0 +1,13 @@
FROM node:18-bullseye-slim
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .
RUN npm run build
EXPOSE 7860
CMD [ "npm", "start" ]

1406
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

22
package.json Normal file
View File

@ -0,0 +1,22 @@
{
"name": "oai-reverse-proxy",
"version": "1.0.0",
"description": "Reverse proxy for the OpenAI API",
"scripts": {
"build": "tsc",
"start:dev": "nodemon --watch src --exec ts-node src/server.ts",
"start": "node build/server.js"
},
"author": "",
"license": "MIT",
"dependencies": {
"cors": "^2.8.5",
"express": "^4.18.2",
"pino-http": "^8.3.3"
},
"devDependencies": {
"nodemon": "^2.0.22",
"ts-node": "^10.9.1",
"typescript": "^5.0.4"
}
}

1
src/server.ts Normal file
View File

@ -0,0 +1 @@
console.log("hi");

15
tsconfig.json Normal file
View File

@ -0,0 +1,15 @@
{
"compilerOptions": {
"strict": true,
"target": "ES2020",
"module": "CommonJS",
"moduleResolution": "node",
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"skipLibCheck": true,
"skipDefaultLibCheck": true,
"outDir": "build"
},
"include": ["src"],
"exclude": ["node_modules"]
}