Giter Club home page Giter Club logo

Comments (7)

essenciary avatar essenciary commented on May 22, 2024

A Genie app is a distinct project which uses Genie but is not part of Genie.

You need to execute bin/repl.bat or bin/server.bat in the terminal, while in the app's dir. Or in a Julia REPL, also in the app's folder, run include("genie.jl") -- this will bootstrap the app.
Check out the updated README at https://github.com/essenciary/Genie.jl#loading-an-app

P.S. -- it might be a good idea to automatically load the app if Genie is loaded in an app's dir. I'll give it a try...

from genie.jl.

aalexandersson avatar aalexandersson commented on May 22, 2024

Ok, I tried but still localhost does not show output in the browser (after refresh). Maybe I did something wrong? It's very possible (but not intended)! First, here is more detailed version info:

julia> versioninfo()
Julia Version 1.0.0
Commit 5d4eaca0c9 (2018-08-08 20:58 UTC)
Platform Info:
  OS: Windows (x86_64-w64-mingw32)
  CPU: Intel(R) Core(TM) i7 CPU         870  @ 2.93GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-6.0.0 (ORCJIT, nehalem)
Environment:
  JULIA_EDITOR = "C:\Users\aalexandersson\AppData\Local\atom\app-1.29.0\atom.exe" -a
  JULIA_NUM_THREADS = 4

How should I execute the bat files? If in Windows I double-click bin/repl.bat I get this output (no error)

image

If I instead in Windows double-click bin/server.bat I get this output (error could not open file):

image

If I instead run include("genie.jl") from Julia REPL in my app directory I get this output (no error):

shell> cd Anders_cool_new_app
F:\Julia\Anders_cool_new_app

julia> include("genie.jl")
 _____         _
|   __|___ ___|_|___
|  |  | -_|   | | -_|
|_____|___|_|_|_|___|


Starting Genie in >> DEV << mode

[ Info: Recompiling stale cache file C:\Users\aalexandersson\.julia\compiled\v1.0\Genie\8eazC.ji for Genie [c43c736e-a2d1-11e8-161f-af95117fbd1e]

genie>

But sometimes the [Info: ...] part is omitted. A final detail, which might not matter, is that when the new app was running I used to get lots of "listening/uptime" output.

from genie.jl.

aalexandersson avatar aalexandersson commented on May 22, 2024

I fixed it, There seems to be one missing step in the instructions, because it is not obvious to a beginner like myself: You need to start the web server once Genie is up if you want to see the app in the browser.

genie> Genie.AppServer.startup()
[ Info: Listening on: Sockets.InetAddr{Sockets.IPv4}(ip"127.0.0.1", 0x1f40)
[2018-09-14 09:27:24|info]: Web server running at 127.0.0.1:8000

from genie.jl.

essenciary avatar essenciary commented on May 22, 2024

@aalexandersson That's right - once you include "genie.jl" that loads the app's environment -- but then the server needs to be started.

You're right, it's not clear. I'll put more details in the doc. Also, I'll see maybe Genie can automatically start the app if using Genie in an app's folder. Finally, the fact that bin/server.bat doesn't work looks like a bug, I'll check it out.

from genie.jl.

essenciary avatar essenciary commented on May 22, 2024

@aalexandersson Is this better?
https://github.com/essenciary/Genie.jl#loading-an-app

from genie.jl.

aalexandersson avatar aalexandersson commented on May 22, 2024

Thank you, the wording is much clearer now. I don't know why bin/server.bat resulted in an error (I don't have access yet to Julia in the weekends) but I will keep testing your package. It is very promising!

from genie.jl.

kalokola avatar kalokola commented on May 22, 2024

if you are using vscode enter into the app's main directory type bin/server.bat press enter this will run your server. Then press the add icon to add a new terminal and type bin/repl.bat press enter and a julia command line specific to your project will open. Go your favorite browser and see through your urls.

from genie.jl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.