Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question about ReactJS single page in production with Apache. #1525

Closed
wyattbiker opened this issue Jan 30, 2018 · 1 comment
Closed

Question about ReactJS single page in production with Apache. #1525

wyattbiker opened this issue Jan 30, 2018 · 1 comment

Comments

@wyattbiker
Copy link

I'd like to use Apache to serve static ReactJS content without the need of nodejs running.

Once I create a bundle and just a bunch of static files (e.g. html, json, txt, jpg, etc) on the back end, do I still need nodejs or webpack for anything in production. Also can I use .fetch() for fetching data, from REST services?

In RSK the default dependencies include express and sqlite. What else would I need to forego to make this work (e.g. sqllite?). Thanks

  "dependencies": {
    "@babel/polyfill": "7.0.0-beta.36",
    "bluebird": "^3.5.1",
    "body-parser": "^1.18.2",
    "classnames": "^2.2.5",
    "cookie-parser": "^1.4.3",
    "core-js": "^2.5.3",
    "express": "^4.16.2",
    "express-graphql": "^0.6.11",
    "express-jwt": "^5.3.0",
    "graphql": "^0.12.3",
    "history": "^4.7.2",
    "isomorphic-style-loader": "^4.0.0",
    "jsonwebtoken": "^8.1.0",
    "node-fetch": "^1.7.3",
    "normalize.css": "^7.0.0",
    "passport": "^0.4.0",
    "passport-facebook": "^2.1.1",
    "pretty-error": "^2.1.1",
    "prop-types": "^15.6.0",
    "query-string": "^5.0.1",
    "react": "^16.2.0",
    "react-dom": "^16.2.0",
    "sequelize": "^4.28.6",
    "serialize-javascript": "^1.3.0",
    "source-map-support": "^0.5.0",
    "sqlite3": "^3.1.13",
    "universal-router": "^5.0.0",
    "whatwg-fetch": "^2.0.3"
  },
@frenzzy
Copy link
Member

frenzzy commented Jan 30, 2018

If you don't want to run node.js server, then you have the following options (choose 1 or 2 or 3):

  1. Build an app to static files yarn run build --static and serve the content of build folder only with no dependencies.
  2. Use react-firebase-starter.
  3. Use create-react-app.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants