简体   繁体   中英

Is it possible to use React/Redux/Saga application without back-end

Previously I used React/Redux/Saga just as "presentation" layer of an application with Ruby/Rails and Nodejs back-end.
Currently there are couple of back-end services (which I don't control) I should use for authentication and fetching data in my React/Redux/Saga application.
On my local machine I can run my React/Redux app with help of webpack-dev-server, so it could receive requests from browser.

But what about production environment? Is it possible to deploy React/Redux/Saga application without Nginx, Nodejs, Rails?

For sure. It depends on what are you going to use for deployment. Fe in our projects, we use IIS server for this. It would be published as a simple web app with configurated fallback settings.

Yes you can. You can bundle your app to a standalone working "single page" app with webpack. There are multiple good tutorials and examples on the web if you google.

Another simple solution is to use create-react-app . With this tool you can build your app with a single command and then deploy it to your desired hosting environment.

Create React App

Create React apps with no build configuration.

Create React App works on macOS, Windows, and Linux.

Quick Overview

 npm install -g create-react-app create-react-app my-app cd my-app/ npm start 

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM