website doesnt work (im a newbie)

Hi, i tested my folder, site runs fine on localhost. I set everything up within cloudflare, imported my github repo etc. Created a Cname dns everything. I dont know what im doing wrong
No description
28 Replies
Walshy
Walshy2mo ago
did you add to Pages custom domains?
swagman3000
swagman3000OP2mo ago
Yes
Walshy
Walshy2mo ago
Can you share a screenshot? I can't see it on my side
swagman3000
swagman3000OP2mo ago
Okay one moment
swagman3000
swagman3000OP2mo ago
No description
No description
Walshy
Walshy2mo ago
The "Custom Domains" tab in the external-source project is what you're looking for magic link: https://dash.cloudflare.com/?to=/:account/pages/view/:pages-project/domains though it may not be the most magical experience on mobile haha
swagman3000
swagman3000OP2mo ago
Aha Did that
swagman3000
swagman3000OP2mo ago
No description
swagman3000
swagman3000OP2mo ago
I configured the existing record Is that correct?
Walshy
Walshy2mo ago
yep so you'll need to add that
swagman3000
swagman3000OP2mo ago
Okay It says Initializing now
Walshy
Walshy2mo ago
there ya go and it should become active any second
swagman3000
swagman3000OP2mo ago
Alright It says active now https://external-source.com But the website is blank Hahaha What did i do wrong boss
Walshy
Walshy2mo ago
it looks like you uploaded the source files rather than the built files
swagman3000
swagman3000OP2mo ago
What can i do now I dont have experience with this
Walshy
Walshy2mo ago
$ curl https://external-source.com/app/page.tsx -s | head -n 5
'use client'

import React, { useEffect, useRef } from 'react'
import Link from 'next/link'
import { Button } from "@/components/ui/button"
$ curl https://external-source.com/app/page.tsx -s | head -n 5
'use client'

import React, { useEffect, useRef } from 'react'
import Link from 'next/link'
import { Button } from "@/components/ui/button"
you'll want to build the site npm run build or whatever and then upload the build output
swagman3000
swagman3000OP2mo ago
Okay Let me try okay... i build it and placed it in a new repo and pushed it into a new deployment also setup the new dns but site still doesnt load does it need time? This site can’t provide a secure connection 324c7f25.external-source2.pages.dev uses an unsupported protocol. ERR_SSL_VERSION_OR_CIPHER_MISMATCH
swagman3000
swagman3000OP2mo ago
and its not possible to remove the 2 inactive deployments?
No description
swagman3000
swagman3000OP2mo ago
external-source.com gives 522 error, and https://324c7f25.external-source2.pages.dev/ gives 404 error
Walshy
Walshy2mo ago
did you delete the custom domain?
swagman3000
swagman3000OP2mo ago
added it to the new one now getting 404 instead of 522 no cloudflare page anymore just chrome 404
Walshy
Walshy2mo ago
looks like it's still the source code
swagman3000
swagman3000OP2mo ago
i dont get it cuz it runs fine locally
Walshy
Walshy2mo ago
you're probably running the dev server locally which is building and serving on the fly here we just need the build output
swagman3000
swagman3000OP2mo ago
i have legit no clue how coding or sites work but i got it to work i think i added a export line in package json which gave me an out folder with html files i ran that locally, that works fine when i run the entire folder with the typescript files i get an error even locally i installed a different package to run locally and there i got errors too so i guess its something in the react files external-source.com i made it work 🙂 @Walshy quick question how do i hide my sourcecode from my website if i click inspect?
swagman3000
swagman3000OP2mo ago
No description
swagman3000
swagman3000OP2mo ago
everybody can just copy the code like this please help haha i added a _header file and pushed it but it doesnt apply somehow
DaCubeKing
DaCubeKing2mo ago
you can minify (looks like you already are), but you can't hide anymore than that.
Want results from more Discord servers?
Add your server