Back
Similar todos
Got my frontend app deployed to Netlify, it was surprisingly easy. Changed my Cloudflare DNS settings for the domain to point to Netlify, and turned off the 'Proxy' setting in Cloudflare. Changed my frontend and backend code to use the new setup of having the api at a different domain instead of at `/api/` at the same domain. Tomorrow I'll need to test that local development is still working properly and then see if I can get it working on Netlify/DigitalOcean.
See similar todos

No replies yet

Continuing to try to get Dokku working with a monorepo; I think I got past my last problem of how to deploy both apps by running on the server `dokku builder:set backend-app build-dir backend` (and similar for the frontend); now I'm seeing a new error when I try to deploy the frontend app: `Two different lockfiles found: package-lock.json and yarn.lock`; I seemed to fix it by deleting the yarn.lock. New error: "Missing script: start"; fixed that by adding a 'start' entry to my package.json. New error: "Cannot find module '@vitejs/plugin-vue'"; maybe because it's listed as a devDependency? I found this SO post where the guy said he ended up just putting his frontend on Netlify, so maybe I'll try that instead: stackoverflow.com/a/62455021/… ChatGPT is saying the way to do it is to deploy my API at api.mydomain.com and then direct traffic at other subdomains to Netlify to handle frontend requests. So I'll try that tomorrow.
See similar todos

No replies yet

Continuing to look into the CORS error I'm getting when my frontend tries to make an API request to my backend; it seems my backend dokku app wasn't deployed for some reason; destroyed my existing go dokku app and recreated it and then struggled with an error for a while before realizing I had the same issue a few days ago and the solution was to run `dokku builder:set backend-app build-dir backend`; now getting an error saying the download for my specified version of Go is "unknown to the buildpack"; after much trial-and-error I realized the problem was that Dokku has a stupid error message that makes it sound like it has already automatically chosen a Go buildpack when in fact it has not. I was additionally getting confused because I was seeing Dokku installing Go and not realizing that was because of my +heroku instruction in my go.mod file rather than Dokku automatically using a Go buildpack. The solution was to specify a Go buildpack for my app with `dokku buildpacks:add <my-app> heroku/go`. Now getting a new error: "Failed to connect to database". Fixed it by switching my code to use the `DATABASE_URL` environment variable that Dokku creates for your code to connect to the db. My `git push dokku main` finally succeeded, but I'm still getting a CORS error. Eventually figured out it was because my Dokku app name was `whatdo-backend` when I had forgotten that that would also be the name of the subdomain, so I had to delete the app and recreate it with the name `api`. I also created a `/ping` health-check URL to help me debug this more quickly. I'm now getting a 521 error, I think maybe because Dokku is running on http and Cloudflare is reaching out via https?
See similar todos

No replies yet

Only got ~5hrs of sleep after two double espressos yesterday, so I took a Lycopene capsule...signed up for a LinkedIn Premium free trial so I could send a message to a Kasikorn backend engineer to ask why users can't export their transaction history in CSV format...removed the 'Blog' link on nw.com b/c I don't have the WordPress blog up and I never really used the blog that much, added a link to my email address instead so people can contact me...started going through the Kasikorn API "Slip Verification" challenges...got the first one done...the second one requires I have SSL set up on my domain and not through Cloudflare...discovered while doing that that my whatdo site is returning a 404 if I try to sign in...got GoLand's db tool connecting to the digital ocean postgres db b/c I noticed that wasn't set up yet...install postgres on my macbook b/c something got messed up and somehow it seemed to not be installed...got all the db problems fixed, don't know how that happened...now having a CORS issue when running locally, all this stuff was working, IDK how it all broke...ok I remember now, I YOLO'd the backend code and disabled the existing router to get the Line echo bot working...sent an email to another local YouTuber to ask if I can be in a video with him...installed cursor and tried using it for a simple refactor task to get a sense of how it works...figured out a way (thanks to ChatGPT) to get the Line callback handler working while also not breaking the existing routes...went for a massage to give my brain cells some time to recover...used cursor some more and I get the hype, this is really cool, I'm surprised Jetbrains hasn't copied it yet...after a long while I finally got my whatdo backend working properly again (auth + user middleware working), it was a good learning experience with cursor and Go...got a GitHub Action set up so my DO dokku VPS will update when I push to main, so now both frontend and backend will update automatically when I push to GitHub...ending the day on this banger set: www.youtube.com/watch?v=d2340… Tomorrow: I need to bill hours to my client to make $, I want to try to finish the KBank API challenge to see if I can do the Slip Verification, I want to email another YouTuber, if I have any time left over I want to keep going with that Line/ChatGPT bot and try to make a frontend interface for it.
See similar todos

No replies yet

Got back into working on my HN-jobs-auto-applier: Built the UI to allow a user to click a button to connect their gmail account to my app and have it save access / refresh tokens to the backend...fixed misc things that broke for unknown reasons...got the backend deploying to digital ocean without erroring, not sure why it stopped working...currently trying to figure out why, when I ssh into my server, it seems to show me at an older commit, when my github action seems to be working without errors and having me at the newest commit...figured out that I was running the wrong command to check the current commit, IDK why an older commit was still present in some of the files...FINALLY got prod working where I can sign into gmail, upload my resume, and send an email to myself. FUCK that was so much harder than it should've been...added a netlify.toml redirect so that I can go to whatdo.com/jobs and have it load the SPA instead of 404ing...fixed a bug where a refresh token wasn't being saved to the db in prod...
See similar todos

No replies yet

Messing around with cors proxies all day to get data from a gov public endpoint that's blocked by cors/csp. Tried Github's Flat Data too (that uses GH Actions). Didn't manage to solve it. Might try Cloudflare Workers using cloudflare-cors-anywhere instead. #uvindexsg #socialimpactpatronage
See similar todos

No replies yet

Spent an hour reading some of [the backend code][1] for a Go / Vue chat app I saw posted to Reddit, as a way of trying to build familiarity with how my Go / Vue projects should be structured / work. [1]: github.com/wizzldev/backend/
See similar todos