GithubHelp home page GithubHelp logo

Comments (6)

zfletch avatar zfletch commented on June 9, 2024 1

I do think it makes sense to include some deployment information in the README. What information would you need or would you find helpful in order to deploy it?

Since it's JavaScript app, you should be able to build it then serve the static assets using any web server. The one difficulty is that you need to change the PUBLIC_URL depending on the path.

For example, if you're deploying it to whatever.com/, you can run PUBLIC_URL='./' yarn build and then use the assets in the build/ folder. However, if you're deploying it to whatever.com/apps/lsj/, you would need to run PUBLIC_URL=./apps/lsj/ yarn build.

from lsj-js.

nikolas-n avatar nikolas-n commented on June 9, 2024 1

Thanks, it worked! I just run PUBLIC_URL='./' yarn build and it works. Maybe, if you have time, you could add your response to my comment into the README.md. I believe it'll be sufficient for anyone who is not familiar with yarn and wants to get a production build of your application (just like me).

from lsj-js.

chopinesque avatar chopinesque commented on June 9, 2024

Is it possible to run it locally on Windows 10, or even in AMPPS? Not sure of the procedure. I tried installing https://yarnpkg.com/lang/en/docs/install/#windows-stable and then running and https://nodejs.org/en/download/ but no luck with yarn test, I got:

yarn run v1.13.0
$ react-app-rewired test --env=jsdom
'react-app-rewired' is not recognized as an internal or external command,
operable program or batch file.
error Command failed with exit code 1.

from lsj-js.

zfletch avatar zfletch commented on June 9, 2024

@chopinesque I don't see why it wouldn't run on Windows. Have you run yarn install before running yarn test?

from lsj-js.

chopinesque avatar chopinesque commented on June 9, 2024

Let me get this right; I installed Node.js and I get now on its cmd:

Test Suites: 1 passed, 1 total
Tests:       3 passed, 3 total
Snapshots:   0 total
Time:        7.503s
Ran all test suites.

Watch Usage: Press w to show more.

How do I actually make a search on my machine? Excuse my ignorance.

from lsj-js.

zfletch avatar zfletch commented on June 9, 2024

@chopinesque It looks like you have tests passing locally, which is good news. It means everything is installed correctly. If you would like to run a development server locally, the command you want to run is yarn start (not yarn test). After running yarn start, you can use the application locally by visiting http://localhost:3000/ in a web browser.

If you would like to create a production version of the application and serve it with a web server, the command you want to run in PUBLIC_URL='/' yarn build. You may need to change / if you are going to serve the application on a different path (see README.md). This command will create static HTML and JavaScript files in the ./build directory that you can serve directly with the web server of your choice.

This application is built on top of Create React App. If you'd like more information about how it works, I'd recommend checking out their documentation as well.

from lsj-js.

Related Issues (10)

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.