Artifacts Gallery Guilds Search Wiki Login Register

Welcome, Guest. Please login or register. - Thinking of joining?
Autumn, 26 Sep 2026 - @462.40
Forum Activity: Four Stars Random | Recent Posts | Guild Recents
News: :skull: Websites are like whispers in the night  :skull: Guild Events: weekly zine jam 13: hope
Super News: ~~MelonLand's Halloween Profile Design Contest 2026~~
+  MelonLand Forum
|-+  Da Web Revival
| |-+  ✁ ∙ Web Crafting
| | |-+  ☔︎ ∙ I need Help!
| | | |-+  Code program with a live preview


« previous next »
Pages: [1] Print Embed
Author Topic: Code program with a live preview  (Read 1623 times)
kiyuyu
Casual Poster
*
View Profile WWW


⛺︎ My Room
SpaceHey: Friend Me!
StatusCafe: kiyuyu

Artifacts:
Joined 2024!
« on: Summer, 10 Jul 2024 @374 » Toggle Font Embed

Okay so I've tried a couple things for this, but is there a desktop program that you can code in that has a live preview similar to codepen? I need it to be full size (I have two monitors) because I'm old and a visual learner. I want something to play around in that won't immediately break what I have running, but for some reason the other programs I've tried don't work. I tried VS Studio with live preview (nothing shows up and the program itself has a bit of a learning curve I don't really want to fiddle with it if I'm honest) and playpen I think it was called. Neither of the live previews worked with the css & html I have and I don't know why as it clearly works on the site host.

sorry if it's poorly explained I hope this makes sense, it's 3am here so I am going to sleep but this was eluding me via google searches.  :tnt:  I will look about in the morning.

Logged
Melooon
Hero Member ⚓︎
*****
View Profile WWWArt


So many stars!
⛺︎ My Room
SpaceHey: Friend Me!
StatusCafe: melon
iMood: Melonking
Itch.io: My Games
RSS: RSS

Guild Memberships:
Artifacts:
You're a Star!Flinstone VitaminWavy Shoulder-Length Hair with BangsBug!Top HatI got robbed by Dan Q on Melonland!
« Reply #1 on: Summer, 10 Jul 2024 @496 » Toggle Font Embed

Live code plugins are sometimes handy, but Iv tried about 10 at this point and all of them have had some sort of deal breaking bug or issue that made them unusable for me  :sad:

You're much better off just setting up a local web server and using that to preview your site in a proper browser (and just reloading the page each time you need to see an edit) ~ I know if your hoping for automatic updates, that sounds like a chore; but auto update systems really only work for simple standard websites or code snippets ~ they are not designed to handle the kinda funky code and complex styles people do on homepages  :ohdear: They always get confused and turn into a mess when they try and preview my sites  :drat:

Sooo; the most universal way to setup a local server is to..
1. install Python (its a programing language but it has the ability to start super simple webservers too!)

2. Find the Terminal / Command Prompt in your Applications/Start Menu and pin its icon to your Dock/Task Bar

3. Then drag your websites folder onto the Terminal / Command Prompt icon (this should open a console window that's set to your website folder)

4. Then run this command:
Code
python3 -m http.server 8000

That should start a webserver that will stay running until you close the console window; and if you go to http://localhost:8000 in your browser it should load your website!

Apologies if there's an issue here as I have only tested this on mac! Also also if you are on mac and want a simple program to do the same thing with a nice UI, you can get this one for free instead!  :4u:

Logged


everything lost will be recovered, when you drift into the arms of the undiscovered

Artifact Swap: black n cyan yappin kittayHave a chillpillThe Wizards OrbRed Tulip100 coins<3eyntivemds pet fishcurious fishPlank
kiyuyu
Casual Poster
*
View Profile WWW


⛺︎ My Room
SpaceHey: Friend Me!
StatusCafe: kiyuyu

Artifacts:
Joined 2024!
« Reply #2 on: Summer, 10 Jul 2024 @927 » Toggle Font Embed

Live code plugins are sometimes handy, but Iv tried about 10 at this point and all of them have had some sort of deal breaking bug or issue that made them unusable for me  :sad:

You're much better off just setting up a local web server and using that to preview your site in a proper browser (and just reloading the page each time you need to see an edit) ~ I know if your hoping for automatic updates, that sounds like a chore; but auto update systems really only work for simple standard websites or code snippets ~ they are not designed to handle the kinda funky code and complex styles people do on homepages  :ohdear: They always get confused and turn into a mess when they try and preview my sites  :drat:

Sooo; the most universal way to setup a local server is to..
1. install Python (its a programing language but it has the ability to start super simple webservers too!)

2. Find the Terminal / Command Prompt in your Applications/Start Menu and pin its icon to your Dock/Task Bar

3. Then drag your websites folder onto the Terminal / Command Prompt icon (this should open a console window that's set to your website folder)

4. Then run this command:
Code
python3 -m http.server 8000

That should start a webserver that will stay running until you close the console window; and if you go to http://localhost:8000 in your browser it should load your website!

Apologies if there's an issue here as I have only tested this on mac! Also also if you are on mac and want a simple program to do the same thing with a nice UI, you can get this one for free instead!  :4u:

Ahhh that makes sense why it doesn't work, I guess personal type webpages would be harder than the same ten webpages they seem to use for everything now. :drat: 

I am a Windows PC haver so I will give the python method a try and see if it works for PC too. :unite:

Logged
Memory
Guest

« Reply #3 on: Summer, 11 Jul 2024 @985 » Embed

i use vscode with a live preview plugin and it works okay! as melon said, though, it can be janky. when i was working on a page for the recent 32 bit cafe codejam, the preview kept dumping some of my divs offscreen unless i wiggled my cursor over the preview, which would make them slowly scoot back to where it was supposed to be like some kind of frightened beast.....

Logged
kiyuyu
Casual Poster
*
View Profile WWW


⛺︎ My Room
SpaceHey: Friend Me!
StatusCafe: kiyuyu

Artifacts:
Joined 2024!
« Reply #4 on: Summer, 11 Jul 2024 @038 » Toggle Font Embed

i use vscode with a live preview plugin and it works okay! as melon said, though, it can be janky. when i was working on a page for the recent 32 bit cafe codejam, the preview kept dumping some of my divs offscreen unless i wiggled my cursor over the preview, which would make them slowly scoot back to where it was supposed to be like some kind of frightened beast.....

It doesn't work for me is the issue, I'm glad it works for you though! If it worked for me even a little I wouldn't have the issue. jeez louise tho I think even if it did that would drive me crazy.:ohdear:

@Melooon 
I followed your instructions but when I dragged the folder into the command terminal it gave me alla this. Did I follow incorrectly? I'm not sure what this means.
https://i.imgur.com/JjTcFbd.png

Logged
Pages: [1] Print Embed 
« previous next »
 

Melonking.Net © Always and ever was! SMF 2.0.19 | SMF © 2021 | Privacy Notice | Send Feedback | Supporters ♥ Forum Guide | Rules | RSS | WAP | Mobile


MelonLand Badges and Other Melon Sites!

MelonLand Project! Visit the MelonLand Forum! Support the Forum
Visit Melonking.Net! Visit the Gif Gallery! Pixel Sea TamaNOTchi
@000 Melon
Land
Forum Art Hub Chat Webring Enter Random Recent Tenement Arcade Want to Login or Join ? Web Craft Guide Graphic Catalogue Wiki Help I'm Lost! Link Land Newsletters Image Stream Minecraft: Online
Zap!
Passport Sites Asatte Add your site?
Aero Archive Onio Cafe 32 Bit Cafe Status Cafe