Skip to content
This repository has been archived by the owner on Sep 18, 2024. It is now read-only.

A sample app to show case new remix.run JS framework with MongoDB Atlas Data Rest API

License

Notifications You must be signed in to change notification settings

mongodb-developer/atlas-data-api-remix

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Notice: Repository Deprecation

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.

atlas-data-api-remix

A sample app to show case the new Remix JS framework with MongoDB Atlas Data Rest API

Prerquisities

  • 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_mflix for 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 .env file in the main directory:

DATA_API_KEY=<API-KEY>
DATA_API_BASE_URL=<YOUR-DATA-ENDPOINT-URL>
CLUSTER_NAME=<YOUR-ATLAS-CLUSTER-NANE>

Development

Install:

npm install

From your terminal:

npm run dev

This starts your app in development mode, rebuilding assets on file changes.

Deployment

First, build your app for production:

npm run build

Then 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 start

Application

Once the web server starts go into the main page and navigate to an app link.

Movies search

  • Click movies for further information
  • Search key words to find movies.

Facet search

  • Click Facets Search for further information
  • Click on a genre to get to movies for that genre.

Disclaimer

Use at your own risk; not a supported MongoDB product

About

A sample app to show case new remix.run JS framework with MongoDB Atlas Data Rest API

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published