Spaces:
Sleeping
Sleeping
| # Use an official Node.js runtime as a parent image | |
| FROM node:20-alpine | |
| # Set the working directory | |
| WORKDIR /src | |
| # Copy package.json and package-lock.json (if available) | |
| COPY src/package*.json ./ | |
| # Install dependencies | |
| RUN npm install | |
| # Copy the rest of the application source code | |
| COPY src/ ./ | |
| # Expose the port expected by Hugging Face Spaces | |
| EXPOSE 9090 | |
| # Start the application on 0.0.0.0 and use the port from $PORT (default 9090), allow all hosts | |
| CMD ["sh", "-c", "npm start -- --host 0.0.0.0 --port ${PORT:-9090} --allowed-hosts all"] |