- After fetching join code in EnterCode(), it sets networkId attribute on "signup-" (Signup.js)
- Signup.js then includes the attribute in the call body
- Modified all calls to /signout, /profile, /login, /signup to be prefixed by '/auth'
- Added '/auth' to vite config file
- Modified final "else if" statement in .attr in quill.js to return `this.getAttribute(arg1)` instead of `this.getAttribute("")`
Run in Browser
npm run start
Browser: Dev Frontend and Dev Backend (localhost)
This option should be at the top level of capacitor.config.json "server": { "url": "http://sam.local:5173", "cleartext": true },
Browser: Prod Frontend and Prod Backend
Run: vite build npx serve dist
If you need to login again: run localStorage.clear() in the browser dev tools console and then refresh the page.
Run On Device
https://capacitorjs.com/docs/ios#adding-the-ios-platform
One-Time Install: npm install @capacitor/ios npx cap add ios
To Open XCode: npx cap open ios
Run this command to rebuild for iOS npm run build && npx cap copy ios
If getting black screen: npx cap sync iOS
iOS: Dev Frontend and Dev Backend (localhost)
This option should be at the top level of capacitor.config.json "server": { "url": "http://sam.local:5173", "cleartext": true },
iOS: Dev Frontend with Prod Backend (frm.so)
Add "https://frm.so" to VITE_API_URL in .env.development
iOS: Prod Frontend and Prod Backend (frm.so)
Remove the "server" object from capacitor.config
Various Commands
npx cap config - this will list the full configuration currently being used
Architecture
In Development, API routes are routed using the vite.config.js.
Notes
Background Color: In src/manifest.json, "#31d53d" refers to the green color which is visible in the background in the web version. This is not visible in the built version.