Note this is oversimplified, without any caching, SSR, Static generation etc.
It shows how to centrally configure and connect to fms, storing DAPI session info in MongoDB. See lib/fm-connect.js
-
Host the included
Contacts.fmp12
on FMS. Be sure to add a password. -
Create a file called
.env.local
with these items:# You can get a MongoDB in the cloud for free here! https://www.mongodb.com/atlas/database MONGO_URL=mongodb+srv://ACCOUNT:PASSWORD@DB_NAME.sgrkc.mongodb.net/COLLECTION?retryWrites=true&w=majority # any name for identifying a client in MongoDB CLIENT_NAME= # database name DATABASE= # server address including https:// SERVER= # DB creds USERNAME= PASSWORD= # CLIENT_USAGE_TRACKING=false
-
Install Dependencies
npm install
-
Start developing!
npm run dev