listnplay / riot-isomorphic Goto Github PK
View Code? Open in Web Editor NEWA riotjs isomorphic application
A riotjs isomorphic application
marek@dell:~/www/riot/riot-isomorphic$ gulp
[13:37:59] Using gulpfile /home/www/riot/riot-isomorphic/gulpfile.js
[13:37:59] Starting 'html'...
[13:37:59] Finished 'html' after 4.18 ms
[13:37:59] Starting 'css'...
[13:37:59] Starting 'public-lib'...
[13:37:59] Starting 'js-client'...
[13:37:59] Starting 'js-server'...
[13:37:59] Starting 'js-app'...
[13:37:59] Starting 'env'...
[13:37:59] Finished 'env' after 37 μs
[13:37:59] Finished 'public-lib' after 30 ms
[13:37:59] Finished 'js-client' after 32 ms
[13:37:59] Finished 'css' after 79 ms
[13:37:59] Starting 'public-css'...
[13:37:59] Finished 'public-css' after 6.07 ms
[13:37:59] Finished 'js-server' after 81 ms
[13:37:59] Finished 'js-app' after 84 ms
[13:37:59] Starting 'browserify'...
events.js:72
throw er; // Unhandled 'error' event
^
Error: Cannot find module './stores/server' from '/home/www/riot/riot-isomorphic/build/app'
at /home/www/riot/riot-isomorphic/node_modules/browserify/node_modules/resolve/lib/async.js:55:21
at load (/home/www/riot/riot-isomorphic/node_modules/browserify/node_modules/resolve/lib/async.js:69:43)
at onex (/home/www/riot/riot-isomorphic/node_modules/browserify/node_modules/resolve/lib/async.js:92:31)
at /home/www/riot/riot-isomorphic/node_modules/browserify/node_modules/resolve/lib/async.js:22:47
at Object.oncomplete (fs.js:107:15)
Can you add more Docs or comments about Flux and isomorphic in your code ?
This is awesome. But I was curious to know If there is any way to render nested tags.
gulp build error: task 'js' is not in your gulpfile
Receiving the following error when I run gulp:
Potentially unhandled rejection [3] Error loading "server/index" at C:\Users\Thomas\riot-isomorphic/build/server/index.js Only file URLs of the form file: allowed running in Node. (WARNING: non-Error used)
So the server-side of this app does a text substitution of the main tag with the server-side rendered data. But the client side, for some reason, mounts the 'main' tag as well, despite the fact that it was already rendered (and substituted!) server-side, so there's nothing to change. Is this just to show how you could (or should), is there some other mechanic here I'm missing (to get it to update client-side?), or is it unnecessary? Maybe all three?
hi,
after all install instructions, running gulp
and trying to get http://localhost:3000
throw this log output:
tried to update riot.js lib but do the same
gulp
[22:19:19] Using gulpfile ~/dev/js/riot/riot-isomorphic/gulpfile.js
[22:19:19] Starting 'html'...
[22:19:19] Finished 'html' after 14 ms
[22:19:19] Starting 'css'...
[22:19:19] Starting 'public-lib'...
[22:19:19] Starting 'js-client'...
[22:19:19] Starting 'js-server'...
[22:19:19] Starting 'js-app'...
[22:19:19] Starting 'env'...
[22:19:19] Finished 'env' after 27 μs
[22:19:19] Finished 'public-lib' after 70 ms
[22:19:19] Finished 'js-client' after 72 ms
[22:19:19] Finished 'css' after 172 ms
[22:19:19] Starting 'public-css'...
[22:19:19] Finished 'public-css' after 15 ms
[22:19:19] Finished 'js-server' after 177 ms
[22:19:19] Finished 'js-app' after 186 ms
[22:19:19] Starting 'browserify'...
[22:19:24] Finished 'browserify' after 5.05 s
[22:19:24] Starting 'public'...
[22:19:24] Finished 'public' after 32 ms
[22:19:24] Starting 'serve'...
livereload[tiny-lr] listening on 35729 ...
Component Factory constructed
Routes class constructed!
running routingTable!
User service::Inserting Hooks
Created default user { username: 'test',
password: '7110eda4d09e062aa5e4a390b0a572ac0d2c0220',
id: 0 }
Starting server
Node/Feathers app listening at http://:::3000
Socket util - Server init with URL: http://localhost:3000
Socket connection is open
Default route!
Store base class constructor
Init FruitStore
Store base class constructor
Init AuthStore
Store base class constructor
Init MainStore
Dispatcher initialized. 3 stores
Init Apple tag
App engine error: [SyntaxError: Unexpected token (] Filepath: /home/lionel/dev/js/riot/riot-isomorphic/build/index.html Callback: function (err, str) {
if (err) return req.next(err);
self.send(str);
}
SyntaxError: Unexpected token (
at Function (native)
at _create (/home/lionel/dev/js/riot/riot-isomorphic/node_modules/riot/riot.js:735:12)
at _tmpl (/home/lionel/dev/js/riot/riot-isomorphic/node_modules/riot/riot.js:707:43)
at /home/lionel/dev/js/riot/riot-isomorphic/node_modules/riot/riot.js:1690:15
at each (/home/lionel/dev/js/riot/riot-isomorphic/node_modules/riot/riot.js:1793:23)
at update (/home/lionel/dev/js/riot/riot-isomorphic/node_modules/riot/riot.js:1686:3)
at Tag.<anonymous> (/home/lionel/dev/js/riot/riot-isomorphic/node_modules/riot/riot.js:1452:5)
at /home/lionel/dev/js/riot/riot-isomorphic/node_modules/riot/riot.js:130:12
at String.replace (native)
at RegExp.<anonymous> (/home/lionel/dev/js/riot/riot-isomorphic/node_modules/core-js/modules/$.fix-re-wks.js:20:48)
[13:46:14] Using gulpfile ~/Workspace/page.js-demo1/riot-isomorphic/riot-isomorphic/gulpfile.js
[13:46:14] Starting 'html'...
[13:46:14] Finished 'html' after 25 ms
[13:46:14] Starting 'css'...
[13:46:14] Starting 'public-lib'...
[13:46:14] Starting 'js-client'...
[13:46:14] Starting 'js-server'...
[13:46:14] Starting 'js-app'...
[13:46:14] Starting 'env'...
[13:46:14] Finished 'env' after 94 μs
[13:46:15] Finished 'public-lib' after 298 ms
[13:46:15] Finished 'js-client' after 298 ms
[13:46:15] Finished 'css' after 334 ms
[13:46:15] Starting 'public-css'...
[13:46:15] Finished 'public-css' after 22 ms
[13:46:15] Finished 'js-server' after 320 ms
[13:46:15] Finished 'js-app' after 319 ms
[13:46:15] Starting 'browserify'...
[13:46:21] Finished 'browserify' after 6.47 s
[13:46:21] Starting 'public'...
[13:46:21] Finished 'public' after 21 ms
[13:46:21] Starting 'serve'...
livereload[tiny-lr] listening on 35729 ...
Routes class constructed!
Init FruitStore
Init ServerStore
running routingTable!
events.js:85
throw er; // Unhandled 'error' event
^
Error: listen EADDRINUSE
at exports._errnoException (util.js:746:11)
at Server._listen2 (net.js:1129:14)
at listen (net.js:1155:10)
at Server.listen (net.js:1240:5)
at EventEmitter.app.listen (/home/alex/Workspace/page.js-demo1/riot-isomorphic/riot-isomorphic/node_modules/express/lib/application.js:595:24)
at EventEmitter.module.exports.listen (/home/alex/Workspace/page.js-demo1/riot-isomorphic/riot-isomorphic/node_modules/feathers/lib/application.js:107:30)
at EventEmitter.self.(anonymous function) (/home/alex/Workspace/page.js-demo1/riot-isomorphic/riot-isomorphic/node_modules/feathers/node_modules/uberproto/lib/proto.js:61:21)
at Object. (/home/alex/Workspace/page.js-demo1/riot-isomorphic/riot-isomorphic/build/server/index.js:98:6)
at Module._compile (module.js:460:26)
at normalLoader (/home/alex/Workspace/page.js-demo1/riot-isomorphic/riot-isomorphic/node_modules/babel/node_modules/babel-core/lib/babel/api/register/node.js:122:5)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.