Home Events! Entrance Everyone Wiki Search Login Register

Welcome, Guest. Please login or register. - Thinking of joining the forum??
November 22, 2024 - @263.52 (what is this?)
Forum activity rating: Three Stars Posts: 38/1k.beats Unread Topics | Unread Replies | My Stuff | Random Topic | Recent Posts    Start New Topic
News: :4u: :transport: More is More :transport: :4u:

+  MelonLand Forum
|-+  World Wild Web
| |-+  ✁ ∙ Web Crafting
| | |-+  ☔︎ ∙ I need Help!
| | | |-+  Code program with a live preview


« previous next »
Pages: [1] Print
Author Topic: Code program with a live preview  (Read 252 times)
kiyuyu
Casual Poster ⚓︎
*


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

View Profile WWW

Joined 2024!
« on: July 10, 2024 @374.20 »

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 ⚓︎
*****


So many stars!

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

View Profile WWW

Thanks for being rad!a puppy for your travelsAlways My PalFirst 1000 Members!spring 2023!Squirtle!!!!MIDI WarriorMIDI Warrior1234 Posts!OzspeckCool Dude AwardRising Star of the Web AwardMessage BuddyPocket Icelogist!OG! Joined 2021!...
« Reply #1 on: July 10, 2024 @495.51 »

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
kiyuyu
Casual Poster ⚓︎
*


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

View Profile WWW

Joined 2024!
« Reply #2 on: July 10, 2024 @926.60 »

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
xixxii
Full Member ⚓︎
***


they/them

⛺︎ My Room

View Profile WWW

Web 1.0 Picture Size Expertthe xixxiiJoined 2024!
« Reply #3 on: July 11, 2024 @984.80 »

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 ⚓︎
*


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

View Profile WWW

Joined 2024!
« Reply #4 on: July 11, 2024 @37.63 »

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.
Logged
Pages: [1] Print 
« previous next »
 

Vaguely similar topics! (3)

Deltarune Chapter 2 and The Goner Code

Started by DoctorScreechBoard ♖ ∙ Video Games

Replies: 0
Views: 3370
Last post December 03, 2021 @256.40
by DoctorScreech
What do you use to code websites?

Started by neoratzBoard ✁ ∙ Web Crafting

Replies: 61
Views: 7301
Last post October 29, 2023 @752.06
by wetnoodle
I'll be hosting my first-ever live concert soon.

Started by nsequeira119Board © ∙ Music Room

Replies: 4
Views: 939
Last post November 18, 2022 @975.91
by nsequeira119

Melonking.Net © Always and ever was! SMF 2.0.19 | SMF © 2021, Simple Machines | Terms and Policies 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