TransHub / deploy /README.md
linguabot's picture
Upload folder using huggingface_hub
4f163ba verified

Deployment Instructions

Backend Deployment (Hugging Face Spaces)

  1. Create a new Space on Hugging Face:

  2. Upload files from backend/ folder:

    • All files in this directory
    • Dockerfile
    • package.json and package-lock.json
  3. Set Environment Variables:

    • MONGODB_URI=your_mongodb_atlas_connection_string
    • NODE_ENV=production
    • PORT=5000

Frontend Deployment (Hugging Face Spaces)

  1. Create another Space:

    • Name: your-username/transcreation-frontend
    • Choose "Docker" as the SDK
  2. Upload files from frontend/ folder:

    • All files in this directory
    • Dockerfile
    • nginx.conf
  3. Set Environment Variables:

Database Setup

  1. Create MongoDB Atlas account
  2. Create a new cluster
  3. Get your connection string
  4. Add it as MONGODB_URI environment variable

URLs