react-starter-kit icon indicating copy to clipboard operation
react-starter-kit copied to clipboard

Export client-only version

Open DVLP opened this issue 11 years ago • 14 comments

This is the most complete react template and I love it but it can only be deployed to a node server. How to build a client-only version which would run with any basic http server or even on github in gh-pages branch?

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

DVLP avatar Sep 19 '15 14:09 DVLP

You may want to use a similar template but optimized for hosting in CDN: React Static Boilerplate

koistya avatar Sep 19 '15 20:09 koistya

@koistya :

Is it unpractical for proposing add build flags like npm build -- static to current stack, by adding static-site-generator-webpack-plugin to current automation scripts in /tools/, so that we can have both options of hosting react by node server and static?

If it shouldn't be done, can you explain why?

tomasen avatar Oct 06 '15 10:10 tomasen

I would also love this!

codeorelse avatar Oct 27 '15 10:10 codeorelse

@koistya I'm also curious why this warrants another repo since this seems to get 95% of the job done.

fusepilot avatar Oct 30 '15 03:10 fusepilot

:+1: It would be great to be able to use RSK as SPA with other backends like Rails, Java, not just node.

Initial description of this project is probably a bit misleading - you'd rather name it react-node-starter-kit.

Refs: #368

Thanks

okendoken avatar Jan 11 '16 13:01 okendoken

There are several cases where you would want both isomorphic and client side builds available.

Is this trivial to add?

halvardos avatar Jan 18 '16 10:01 halvardos

@okendoken I know many folks who are using Ruby, .NET, PHP, Go etc. on the backend, still have Node.js in their setup just for server-side rendering of the React app. This project fits well in this scenario since there is very little server-side code.

koistya avatar Jan 18 '16 13:01 koistya

@Jeger It shouldn't be that hard I think, I was going to add --static option for the build scripts, which would allow to build only the client-side portion of the app, ready to be deployed to a static site host provider (GitHub Pages, Amazon S3 etc.).

koistya avatar Jan 18 '16 13:01 koistya

I'd love that feature, as we are trying not to use node as a backend server, but java. :+1:

josetesan avatar Jan 18 '16 14:01 josetesan

That'd be awesome, @koistya!

codeorelse avatar Jan 18 '16 14:01 codeorelse

@koistya that solution would be perfect as far as I'm concerned. And as an added bonus it would widen the group of target users a lot for this project.

While doing some research for starter kits and boilerplates, this is by far the most starred, forked and active repo. The static alternatives are a lot less mature and active.

halvardos avatar Jan 20 '16 10:01 halvardos

:-1: Сompletely agree with @koistya - there is no place for "client only".

Bogdaan avatar Mar 08 '16 11:03 Bogdaan

The --static flag generates the .html files correctly, but when I try to launch the built application (with web root set to build/public), it can't find /graphql (it returns 404). Is there anything else that has to be done apart from npm run build -- --static? When I run the application with node build/server.js, it works correctly.

It would be nice if the app could be exported to a single directory that could be launched as a web root with any web server.

Kobzol avatar Jul 12 '16 20:07 Kobzol

@DVLP thank you very much for crating this issue! Unfortunately, we have close it due to inactivity. Feel free to re-open it or join our Discord channel for discussion.

NOTE: The main branch has been updated with React Starter Kit v2, using JAM-style architecture.

ulani avatar May 27 '21 19:05 ulani