Code Monkey home page Code Monkey logo

Comments (3)

Durss avatar Durss commented on August 10, 2024

Hello :)

Production mode isn't super straigthforward i must admit.
The production mode structure isn't compatible with the GIT project's structure.
Fontend build files for production run must be on the "public" folder, but the GIT project's "public" folder contains only some static files used by Vite to build the "dist" folder.

Basically, if you want to run the project in production mode ("env.conf" content set to prod) you must move everything to a dedicated folder.

Here is what I do to deploy on production:

  • npm run build.
  • this will build the frontend project in the "dist" folder and the backend project on the "server" folder
  • take the content of "server" folder and put it on the project's root of my server (next to node_modules)
  • take the content of "dist" folder and put it inside a "public" folder on the project's root
  • set the "env.conf" content to prod so the app points to the proper folders

With this things should be running properly.

Maybe the readme is missing a line stating explicitely that the files should be move outside the GIT project folder.
Is this what you missed ?

from twitchat.

syrm avatar syrm commented on August 10, 2024

Your explication works, thank you

from twitchat.

Durss avatar Durss commented on August 10, 2024

Just saw the readme indeed had an error it was saying "set the content of the dist folder to the dist folder of the server" instead of "[...] the public folder of the server"

Also I'm gonna renam the local public folder to static as it makes more sense and will be less confusing :)

from twitchat.

Related Issues (20)

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.