Skip to content

Deployment

Puneet Kumar Mishra edited this page Oct 15, 2026 · 1 revision

πŸš€ CrowdWide Deployment Guide

This guide introduces the steps and considerations involved in deploying CrowdWide to a production environment.

πŸ“‹ Prerequisites

Before deploying, ensure you have:

  • Access to the CrowdWide source repository.
  • A hosting environment that supports Node.js.
  • A MongoDB database accessible from the hosting environment.
  • The required environment variables.
  • A domain name and HTTPS configuration, if applicable.

βš™οΈ 1. Prepare the Application

Review the project setup instructions in the Getting Started guide.

Before deployment:

  • Install dependencies.
  • Review the application's configuration.
  • Run the available tests.
  • Check the deployment requirements in the repository's documentation.

πŸ” 2. Configure Environment Variables

Configure the required environment variables in your hosting provider's settings.

Refer to the Configuration guide and the repository's .env.example file.

Important settings may include:

  • MONGODB_URI β€” database connection string.
  • SESSION_SECRET β€” session security secret.
  • APP_URL β€” public application URL.

Use secure production values. Never commit production credentials to GitHub.

πŸ—„οΈ 3. Configure MongoDB

Ensure the production database is available and accessible to the application.

  • Use appropriate database credentials.
  • Restrict database network access.
  • Confirm the application can connect successfully.
  • Establish a backup and recovery process.

▢️ 4. Start the Application

Check the repository's package.json and deployment documentation for the supported production start command.

Do not assume the development command is suitable for production.

Configure the hosting platform to use the correct command and port.

🌐 5. Configure the Domain and HTTPS

If using a custom domain:

  • Point the domain to the hosting provider.
  • Configure HTTPS.
  • Verify that the public application URL matches APP_URL.
  • Check that session cookies use secure settings in production.

πŸ§ͺ 6. Verify the Deployment

After deployment, verify that:

  • The website loads successfully.
  • Database-backed functionality works.
  • Authentication and sessions work as expected.
  • Important pages and forms behave correctly.
  • Server logs contain no unexpected errors.

πŸ›‘οΈ Production Best Practices

  • Keep dependencies updated.
  • Protect application secrets.
  • Monitor application errors and availability.
  • Back up important data.
  • Test changes before releasing them.
  • Avoid exposing sensitive information in logs.

🧰 Troubleshooting

Application fails to start

Check the deployment logs, Node.js version, dependencies, and configured start command.

Database connection fails

Verify MONGODB_URI, database credentials, network access, and database availability.

Environment variables are missing

Confirm that all required variables are configured in the hosting environment.

Website or sessions behave incorrectly

Review the public URL, HTTPS setup, proxy configuration, and session cookie settings.

πŸ“š Related Documentation

For deployment-specific instructions, consult the repository's deployment documentation.