lilast
Browse filesFiles changed (2)
- Dockerfile+11-5
- src/main.ts+4-1
7 unmodified lines8910111213141516171819207 unmodified linesCOPY package*.json ./# Install the project dependenciesRUN npm install# Copy the rest of the project files to the working directoryCOPY . .# Expose port 8080 for the applicationEXPOSE 8080# Specify the command to run your applicationCMD ["npm", "run", "start:dev"]7 unmodified lines8910111213141516171819202122232425267 unmodified linesCOPY package*.json ./# Install the project dependenciesRUN npm install --production# Copy the rest of the project files to the working directoryCOPY . .# Build the app for productionRUN npm run build# Expose port 7860 (Hugging Face Spaces requirement)EXPOSE 7860# Set environment variables for production modeENV NODE_ENV=production PORT=7860# Specify the command to run your application in production modeCMD ["npm", "run", "start:prod"]
18 unmodified lines19202122232418 unmodified linesapp.use(bodyParser.urlencoded({ extended: true }));app.use(bodyParser.json());await app.listen(8080);}bootstrap();18 unmodified lines19202122232425262718 unmodified linesapp.use(bodyParser.urlencoded({ extended: true }));app.use(bodyParser.json());// Use the PORT environment variable or default to 8080const port = process.env.PORT || 7860;await app.listen(port);}bootstrap();
Dockerfile+11-5
src/main.ts+4-1