Comments (4)
I don't think the server-side rendering is necessary as part of the starter-app. It can always be added later.
from pux-starter-app.
Wow! That example is great. I agree about removing pulp and gulp. It'd be great if that were a PR, otherwise I could link to that repo instead of this one in the guide and readme.
from pux-starter-app.
Nice, I would love to do a PR ;) What is the reason about the server side rendering (https://github.com/alexmingoia/pux-starter-app/blob/master/src/js/index.js#L9 and https://github.com/alexmingoia/pux-starter-app/blob/master/src/purs/Main.purs#L36)?
from pux-starter-app.
module.exports = function (url) {
return Main.server(url)(initialState)();
};
The reason for this is because the app needs the request URL to do any routing with Pux.Router
, and so if src/js/index.js
is required in nodejs, it will export a function that takes the request URL from something like Express. There may be a better way to accomplish this.
The other thing I now notice is that when I rewrote this for Pux 1.0.0, I did not actually add back in the code for server-side rendering... so this code isn't even being called. 😆
from pux-starter-app.
Related Issues (20)
- Unable to build due to pux-css HOT 1
- Huge build times HOT 5
- Opinion about CSS Modules? HOT 1
- build fails. HOT 2
- depricated warnings HOT 3
- Serve app from any URL and talk about server setup in the readme
- Page is simply "dist/index.html" on fresh install HOT 4
- Error in Purescript compilation HOT 2
- Hot reload only works with src/Layout.purs
- Hot reloading doesn't work HOT 1
- Server-side pre-rendering: I do not understand how it currently works with Pux HOT 2
- File changes no longer trigger recompilation HOT 2
- Getting an undefined 'val' at runtime HOT 2
- Use Hyper instead of Express HOT 3
- Simplify starter app to be SPA and move isomorphic setup to separate branch
- Doesn't work on Mac OS 10.10.5 HOT 6
- Uglification fails when using webpack -p
- 'pulp browserify --optimise > index.js' couldn't find react-dom HOT 2
- Error on `npm install` HOT 1
- npm start throws error regarding webpack config HOT 3
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 pux-starter-app.