Giter Club home page Giter Club logo

Comments (13)

maxparelius avatar maxparelius commented on May 19, 2024

@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.

Prashant-Mutnale avatar Prashant-Mutnale commented on May 19, 2024

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.

maxparelius avatar maxparelius commented on May 19, 2024

@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.

Prashant-Mutnale avatar Prashant-Mutnale commented on May 19, 2024

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

Screenshot 2019-03-26 at 12 05 42 AM

from create-react-ssr-app.

maxparelius avatar maxparelius commented on May 19, 2024

@Prashant-Mutnale unable to see the screen shot

from create-react-ssr-app.

maxparelius avatar maxparelius commented on May 19, 2024

@Prashant-Mutnale can I see what your Procfile looks like?

from create-react-ssr-app.

Prashant-Mutnale avatar Prashant-Mutnale commented on May 19, 2024

@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

Screenshot 2019-03-26 at 12 57 24 AM

from create-react-ssr-app.

maxparelius avatar maxparelius commented on May 19, 2024

@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.

Prashant-Mutnale avatar Prashant-Mutnale commented on May 19, 2024

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

Screenshot 2019-03-26 at 10 00 41 PM

So when i check it by running the heroku logs --tail it shows the error as Error: Cannot find module '/app/build'

Screenshot 2019-03-26 at 9 58 54 PM

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.

maxparelius avatar maxparelius commented on May 19, 2024

@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.

maxparelius avatar maxparelius commented on May 19, 2024

I verified its working on my end.

from create-react-ssr-app.

maxparelius avatar maxparelius commented on May 19, 2024

@Prashant-Mutnale were you able to get it working? Can I close?

from create-react-ssr-app.

Prashant-Mutnale avatar Prashant-Mutnale commented on May 19, 2024

Yes @maxparelius we can close it now its working fine.

from create-react-ssr-app.

Related Issues (17)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.