Can i host my projects anywhere other than codepen

hello fellow coders, i was wondering if i can host my projects anywhere other than using the FCC codepen. any feedback from this will be appreciated

You definitely can! There are lots of options but I’ll list a couple of my favorites.

One great option is GitHub Pages. You can host your code there for any potential future employers to see and serve up the actual site as well. If you aren’t familiar with GitHub, this is a great chance to learn! It will be an invaluable tool going forward.

Another option is Netlify. You can drag and drop the folder with your project files and it’ll put up the site with those files right away. You can also put the code and GitHub and direct Netlify to pull the code from there.

3 Likes

You can also use Heroku for your full stack.

1 Like

Anywhere that will have your project and source code publicly available

@chris-tse whenever i tried hosting in github pages, i get 404 error

if i click the site link, can you give me a clue on how to tackle this problem

@p-gold Could you give me the link to your GitHub repo where you have the code?

One option I really like now is CodeSandbox

1 Like

@chris-tse here is the repo link https://github.com/p-gold/lenasoft and here is the supposed site link that is showing 404 error https://p-gold.github.io/lenasoft/ check the links and confirm

@jnmorse codeSandbox is cool but am still in the beginnerstage, am not in frameworks. still in vanilla js

You can use it for vanilla JavaScript as well. When you click the create sandbox, you have the option to select vanilla(parcel). This does allow you to use import and exports, and even add react or something later down the road if you wanted to, but can use that for mainly vanilla JavaScript.

@p-gold Yup, that looks right but you have your files inside the “lenasoft” folder. The GitHub pages serves the files with the repo starting at the root of the project.

The structure is username.github.io/reponame as the root, so it is serving files from https://p-gold.github.io/lenasoft/lenasoft/

huh… then how can i make it to start serving from the root so that the url will be shorter instead of https://p-gold.github.io/lenasoft/lenasoft/pages/works.html

Moreover, take a look below,

how can i fix it so that i will be showing me the correct link instead of 404 pages link

@chris-tse i uploaded a new work just now, i tried publishing the page, it still showed me that initial 404 error. below is the screenshot of the link, but its not opening.
landing the repo name is landing-page.

ok @jnmorse thank you sir, will try that out

You may also want to check out surge.sh . Free, command-line access, easy to upload files via CL.

https://surge.sh/

@p-gold So you have your project folder, and inside that folder you have another folder with your files (the same level as the config.yaml file). Move all your project files out of the inner lenasoft folder back out into the main project folder and it will be fine.

@chris-tse sorry if am getting on your nerves. I did as you instructed in your last comment. i deleted the lenasoft folder inside the lenasoft folder, then i deleted the repository as well then pushed the new folder containing only one lenasoft folder (hope you understand what i mean) into github but still the 404 error is still popping up.
here is the new 404 screenshot.
new

compare it with the previous one below

@p-gold No worries at all, we’re all here to help!

I was going to reply but it seems like you figured it out, nice! You could see in the screen shot that the Github Pages site wasn’t found so you hadn’t activated it in your settings yet. Or you did and didn’t wait long enough. Either way, looks like it’s working now!

A nice feature of Github Pages is that when you push new code to your repo, it will automatically update the site after a couple minutes.

@chris-tse you are right, i was impatient. i didnt wait a little to see the effect. but later i refreshed the page and it was showing, i even tried it with a project am currently working on and it worked as well. check it out https://p-gold.github.io/card-matching-game/ (Note: am still working on the project.)

1 Like

@chris-tse thank you for your help, i appreciate so much.

1 Like