This repository is deprecated and no longer actively maintained. It contains outdated code examples or practices that do not align with current MongoDB best practices. While the repository remains accessible for reference purposes, we strongly discourage its use in production environments. Users should be aware that this repository will not receive any further updates, bug fixes, or security patches. This code may expose you to security vulnerabilities, compatibility issues with current MongoDB versions, and potential performance problems. Any implementation based on this repository is at the user's own risk. For up-to-date resources, please refer to the MongoDB Developer Center.
A sample app to show case the new Remix JS framework with MongoDB Atlas Data Rest API
-
Get started with Atlas and prepare a cluster to work with.
-
Enable the DATA API and save the API key
-
Load sample data set into the cluster (This application is using
sample_mflixfor its demo) -
For the full text search capabilities of this demo you need to create a dynamic Atlas Search index on collection
sample_mflix.movies(use default dynamic mappings). Require version 4.4.11+ or 5.0.4+ of the Atlas cluster -
Create a
.envfile in the main directory:
DATA_API_KEY=<API-KEY>
DATA_API_BASE_URL=<YOUR-DATA-ENDPOINT-URL>
CLUSTER_NAME=<YOUR-ATLAS-CLUSTER-NANE>
Install:
npm install
From your terminal:
npm run devThis starts your app in development mode, rebuilding assets on file changes.
First, build your app for production:
npm run buildThen run the app in production mode :
export DATA_API_KEY=<API-KEY>
export DATA_API_BASE_URL=<YOUR-DATA-ENDPOINT-URL>
export CLUSTER_NAME=<YOUR-ATLAS-CLUSTER-NANE>
npm startOnce the web server starts go into the main page and navigate to an app link.
- Click movies for further information
- Search key words to find movies.
- Click Facets Search for further information
- Click on a genre to get to movies for that genre.
Use at your own risk; not a supported MongoDB product