Comments (7)
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.
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)
If I instead in Windows double-click bin/server.bat
I get this output (error could not open file):
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.
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.
@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.
@aalexandersson Is this better?
https://github.com/essenciary/Genie.jl#loading-an-app
from genie.jl.
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.
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)
- Extra .toml files created by newapp_mvc HOT 1
- 404 on minimal tutorial example HOT 2
- ArgumentError("send() requires `!(ws.writeclosed)`") HOT 2
- Improvements to wild-carded segments in a path HOT 4
- Add a feature for declaring a custom static paths ("public/" alternatives) HOT 2
- integration with OpenAPI HOT 5
- Add "base_url" option, to "up()" to lop off referrer route path sent in from proxy servers (e.g. nginx)? HOT 7
- Loading Genie affects conversion of JSON3.Dict into Dict HOT 2
- Passing variables to `html` renderer yields key not found error HOT 4
- hot reload not possible once application hit the error, it require new bootstrap even in GENIE_ENV=dev HOT 4
- Genie.Logger.initialize_logging causes slow Arrow writes HOT 5
- Error reporting dumps sensitive information HOT 3
- Setting EARLYBIND "true" in Dockerfile causes port in use error HOT 3
- index-base transation missing. HOT 1
- Syntax error in first dashboard tutorial HOT 2
- [Bug] can't access own structure's properties in the reactive way HOT 11
- Typos in "your first dashboard" page in the website HOT 3
- Bug: Genie.Renderer.Html.html changes encoding when used with filepath HOT 2
- GC corrution in Genie[Session] HOT 1
- Applications compiled with Genie 5.23.x crashes (expected package `TimeZones [f269a46b]` to exist in the manifest) HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from genie.jl.