Repository navigation
Deployment
This guide introduces the steps and considerations involved in deploying CrowdWide to a production environment.
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.
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.
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.
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.
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.
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.
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.
- 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.
Check the deployment logs, Node.js version, dependencies, and configured start command.
Verify MONGODB_URI, database credentials, network access, and database availability.
Confirm that all required variables are configured in the hosting environment.
Review the public URL, HTTPS setup, proxy configuration, and session cookie settings.
For deployment-specific instructions, consult the repository's deployment documentation.