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.
Direct download: https://gist.github.com/koenbok/07f982fc1346f98a41c9/download
Really useful! Works fine in OS X but I can't connect with my iPhone to the web server
Sorry, solved! Connected to my IP address and add :port. Thanks, a very useful thing!
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 terminal2. 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 window5. hit return
Unfortunately Marc Krenn, i'm trying what you say but I can't make it work. Any advice? Thanks.
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"
Ninh Bui Thank you, I'm a "Terminal" noob! :)
Ah, yes. Permissions.
This is awesome. Great idea.
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.
Smart, I might steal that.
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? :)
Christophe Stoll it was just a quick hack. change line 85 to url = socket.gethostname()+":%s" % port.
Every time I make a change and save in Framer Studio, and then refresh, the server dies. (On Yosemite, YOLO)
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.