This commit is contained in:
parent
36d07fa8dd
commit
805e698668
3
.gitignore
vendored
3
.gitignore
vendored
@ -34,3 +34,6 @@ yarn-error.log*
|
||||
|
||||
# vercel
|
||||
.vercel
|
||||
|
||||
# Typescript compilied files
|
||||
dist
|
||||
|
@ -1,10 +1,7 @@
|
||||
FROM fascinated/docker-images:node-pnpm-latest
|
||||
|
||||
WORKDIR /usr/src/app
|
||||
# COPY package.json pnpm-lock.yaml ./
|
||||
# RUN pnpm install
|
||||
COPY . .
|
||||
RUN pnpm run build
|
||||
ENV PORT=3000
|
||||
EXPOSE 3000
|
||||
CMD [ "pnpm", "start" ]
|
@ -6,7 +6,7 @@
|
||||
"author": "fascinated",
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
"build": "tsc",
|
||||
"build": "tsup src/index.ts --format cjs,esm --dts",
|
||||
"start": "node dist/index.js",
|
||||
"dev": "nodemon --exec ts-node src/index.ts"
|
||||
},
|
||||
|
@ -1,10 +1,7 @@
|
||||
FROM fascinated/docker-images:node-pnpm-latest
|
||||
|
||||
WORKDIR /usr/src/app
|
||||
# COPY package.json pnpm-lock.yaml ./
|
||||
# RUN pnpm install
|
||||
COPY . .
|
||||
RUN pnpm run build
|
||||
ENV PORT=3000
|
||||
EXPOSE 3000
|
||||
CMD [ "pnpm", "start" ]
|
@ -6,7 +6,7 @@
|
||||
"author": "fascinated",
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
"build": "tsc",
|
||||
"build": "tsup src/index.ts --format cjs,esm --dts",
|
||||
"start": "node dist/index.js",
|
||||
"dev": "nodemon --exec ts-node src/index.ts"
|
||||
},
|
||||
|
@ -19,6 +19,7 @@
|
||||
"name": "proxy",
|
||||
"dependencies": {
|
||||
"@types/express": "^4.17.21",
|
||||
"infisical-node": "^1.5.0"
|
||||
"infisical-node": "^1.5.0",
|
||||
"tsup": "^7.2.0"
|
||||
}
|
||||
}
|
||||
|
@ -6,6 +6,10 @@
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"main": "./src/index.ts",
|
||||
"types": "./src/index.ts"
|
||||
"main": "./dist/index.js",
|
||||
"module": "./dist/index.mjs",
|
||||
"types": "./dist/index.d.ts",
|
||||
"scripts": {
|
||||
"build": "tsup src/index.ts --format cjs,esm --dts"
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
import express from "express";
|
||||
import express, { Express } from "express";
|
||||
|
||||
type ServerType = {
|
||||
/**
|
||||
@ -10,7 +10,7 @@ type ServerType = {
|
||||
onLoaded?: () => void;
|
||||
};
|
||||
|
||||
export function createServer({ port = 3000, onLoaded }: ServerType) {
|
||||
export function createServer({ port = 3000, onLoaded }: ServerType): Express {
|
||||
if (typeof port === "string") {
|
||||
port = Number(port);
|
||||
if (isNaN(port)) {
|
||||
|
@ -14,5 +14,5 @@
|
||||
"noEmit": true,
|
||||
"lib": ["es2022", "dom", "dom.iterable"]
|
||||
},
|
||||
"exclude": ["node_modules"]
|
||||
"exclude": ["node_modules", "dist"]
|
||||
}
|
||||
|
@ -6,6 +6,10 @@
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"main": "./src/index.ts",
|
||||
"types": "./src/index.ts"
|
||||
"main": "./dist/index.js",
|
||||
"module": "./dist/index.mjs",
|
||||
"types": "./dist/index.d.ts",
|
||||
"scripts": {
|
||||
"build": "tsup src/index.ts --format cjs,esm --dts"
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"extends": "tsconfig/server.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "dist",
|
||||
"rootDir": "src"
|
||||
}
|
||||
"extends": "tsconfig/server.json"
|
||||
// "compilerOptions": {
|
||||
// "outDir": "dist",
|
||||
// "rootDir": "src"
|
||||
// }
|
||||
}
|
||||
|
495
pnpm-lock.yaml
generated
495
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@ -3,8 +3,8 @@
|
||||
"globalDependencies": ["**/.env"],
|
||||
"pipeline": {
|
||||
"build": {
|
||||
"dependsOn": ["^build"],
|
||||
"outputs": [".next/**", "!.next/cache/**"]
|
||||
"outputs": ["dist/**"],
|
||||
"dependsOn": ["^build"]
|
||||
},
|
||||
"lint": {},
|
||||
"dev": {
|
||||
|
Loading…
Reference in New Issue
Block a user