This is a read-only archive of the Framer Community on Facebook.

What is Framer? Join the Community
Return to index
Koen Bok
Posted Aug 08 - Read on Facebook

Often you want to start a little web server to preview your project on mobile or somewhere else on the network. I tried to simplify that and I need some testers.

This file is called "server.command". You can just copy it to any Framer project and double-click it. It will start a small web server and open your browser for you.

If this works well, I'll add it to the default project template.

[EDIT] There are issues with the way osx saves files. We're figuring out how to solve it.

16 Comments

Lorenzo Ferrante

Really useful! Works fine in OS X but I can't connect with my iPhone to the web server

Lorenzo Ferrante

Sorry, solved! Connected to my IP address and add :port. Thanks, a very useful thing!

Marc Krenn

Just a small hint for noobs/idiots like me who can't execute "server.commend" due to insufficient access privileges ("The file "server.command" could not be executed because you do not have appropriate access privileges"):

1. open terminal
2. type in "chmod +x " (without quotes)
3. (do not hit return just yet!)
4. drag'n'drop "server.command" (which should be in your .framer-file at this point) into your terminal window
5. hit return

Sabato Urciuoli

Unfortunately Marc Krenn, i'm trying what you say but I can't make it work. Any advice? Thanks.

Ninh Bui

Sabato looks like you hit enter after chmod +x, which you shouldn't if you'd like to make the file executable. Just type in "chmod +x " (don't hit enter just yet and mind the extra whitespace I put after the +x) and then drag the file to your terminal. It should expand the path of the file you just dropped there in your terminal. Then hit enter :)

Alternatively, type in the following instead: "chmod +x /Users/sabato/Desktop/sabato/prototyping/1.framer/server.command"

Sabato Urciuoli

Ninh Bui Thank you, I'm a "Terminal" noob! :)

Dan Dalzotto

Dan Dalzotto

Koen Bok

Ah, yes. Permissions.

Jordan Robert Dobson

This is awesome. Great idea.

Andreas Wahlström

nice! the IP didn't work in my phone for some reason but the machine name did. updated my script to use socket.gethostname() instead.

Koen Bok

Smart, I might steal that.

Christophe Stoll

Great! I had to set the permissions for "server.command" manually, too, but then it worked fine on my desktop machine. couldn't open the local IP address on my iPhone, though. Andreas mind sharing your update – like … the full version? :)

Andreas Wahlström

Christophe Stoll it was just a quick hack. change line 85 to url = socket.gethostname()+":%s" % port.

Wilson Miner

Every time I make a change and save in Framer Studio, and then refresh, the server dies. (On Yosemite, YOLO)

Koen Bok

Wilson we just found out about that today. When OSX saves, it actually moves the whole folder out of the way and copies the files back over it again. The little web server doesn't like this at all. We'll have it fixed soon.

Read the entire post on Facebook