Comments (13)
@Prashant-Mutnale since this is a server-side rendered app you can host on any platform that supports node. I believe firebase and surge support static websites only so those tools will not work. If you are looking for a simple solution I recommend Heroku. I can add some documentation on deploying to Heroku. I will let you know when that is done.
from create-react-ssr-app.
Thanks @maxparelius for the response, sure i will try to deploy it in Heroku.
It would be great if you could provide us with the documentation, i will wait for it
from create-react-ssr-app.
@Prashant-Mutnale I have a deployment documentation section here and has information about deploying to heroku: https://trustworktech.github.io/create-react-ssr-app/docs/deployment
from create-react-ssr-app.
Thanks @maxparelius for the documentation I did deploy it to heroku but i'm facing some issue with the http i guess i have attached the image below
from create-react-ssr-app.
@Prashant-Mutnale unable to see the screen shot
from create-react-ssr-app.
@Prashant-Mutnale can I see what your Procfile looks like?
from create-react-ssr-app.
@maxparelius i don't have any Procfile in my root directory.
Do i need to create it ?
i even tried to deploy the create-react-ssr-app without anychanges but still its showing the same error for it
I have attached the image
from create-react-ssr-app.
@Prashant-Mutnale I would create a file called Procfile
in your root dir and add the following:
web: node build
You will also need to build the app during heroku deployments so would add an npm script like so to build the app: "heroku-postbuild": "yarn build"
from create-react-ssr-app.
Thanks @maxparelius I followed the steps by adding Procfile and adding script to the package.json
The build successfully gets deployed but when i open the link in the browser i'm getting this page
So when i check it by running the heroku logs --tail it shows the error as Error: Cannot find module '/app/build'
my Procfile consists as
web: node build
and package.json as
{
"name": "tagmetoo",
"version": "0.1.0",
"private": true,
"dependencies": {
"bootstrap": "^4.3.1",
"express": "^4.16.4",
"firebase": "^5.9.1",
"react": "^16.8.5",
"react-bootstrap": "^1.0.0-beta.6",
"react-dom": "^16.8.5",
"react-redux": "^6.0.1",
"react-router-dom": "^5.0.0",
"react-ssr-scripts": "1.0.4",
"redux": "^4.0.1",
"redux-logger": "^3.0.6",
"redux-promise": "^0.6.0",
"redux-thunk": "^2.3.0",
"serialize-javascript": "^1.6.1"
},
"scripts": {
"start": "react-ssr-scripts start",
"build": "react-ssr-scripts build",
"test": "react-ssr-scripts test",
"eject": "react-ssr-scripts eject",
"heroku-postbuild": "npm build"
},
"eslintConfig": {
"extends": "react-app"
},
"browserslist": [
">0.2%",
"not dead",
"not ie <= 11",
"not op_mini all"
]
}
from create-react-ssr-app.
@Prashant-Mutnale Sorry for the delay. I investigated and saw I had a bug in the package. Thanks for patience. Go ahead and update react-ssr-scripts with yarn add react-ssr-scripts
to get the fix. You can remove the heroku-postbuild
script which is not needed. Keep the Procfile how you have it and then try and deploy again.
from create-react-ssr-app.
I verified its working on my end.
from create-react-ssr-app.
@Prashant-Mutnale were you able to get it working? Can I close?
from create-react-ssr-app.
Yes @maxparelius we can close it now its working fine.
from create-react-ssr-app.
Related Issues (17)
- Error to install HOT 16
- How to write your own api breakpoints? HOT 2
- How to fetch data on server side? HOT 3
- Styles don't load in development (JS Disabled) HOT 5
- Customizing webpack config? HOT 4
- Template doesn't run HOT 2
- Hosting on heroku HOT 1
- ESLint Definition for rule '@typescript-eslint/consistent-type-assertions' HOT 3
- when i have updated build on production on server. i am getting __HELMET_META_ATTRIBUTES__ __STYLE_TAGS__ printed in html. HOT 3
- when i have updated build on production on server. i am getting __HELMET_META_ATTRIBUTES__ __STYLE_TAGS__ printed in html HOT 1
- Post Request
- CSS not loaded? HOT 21
- Proxy in package.json HOT 7
- Implementing redux is not working, I get error unexpected token % HOT 3
- No 'Access-Control-Allow-Origin' header is present on the requested resource HOT 6
- Build Error: Cannot find module ‘./utils/verifyTypeScriptSetup’ HOT 9
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 create-react-ssr-app.