-
Notifications
You must be signed in to change notification settings - Fork 0
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
Restructure to single deploy #26
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Use root src as client code server as the API public as the bundled React App that is then delivered by ExpressJS This will simplify the process of deploying and accessing the app as a whole. Also removing the create-react packages and scripts that were never used.
Using the role name in the login return object will simplify the frontend logic and ensure repeatability on new DB servers where the id is regenerated. Bug in the dash post due to forgotten require statement
Commented out a majority of the App and NavBar in order to prevent errors causing React to not render properly. This is only a first step in redesigning the client code to align with the restructuring. WIP
This allows the main page state to be maintained centrally while the functions and state are passed down to the components
manageMode is sourced at the App level. Potential for introducing Redux to avoid the through-passing past itemGrid
It was getting confusing and difficult to manage various forms of state in a single dialog. Created a new Add dialog to handle creating items only. Cleaned up some commented code and unused imports.
Still a console log there, but less text for now
Still work to do for handling messages and errors
Items API call was being cached when calling update. Added an additional function that specifically sets the Cache-Control header to ensure fresh data always. Added prop to item list for handling errors at the top level App. This will need to be turned into a global service/component soon. An undefined error popped up, so added an additional check in the error handler just in case for now
This branch needs to focus on restructure, not new features
Exclude dotenv from code as this is expected to run as a container using environments in a container is expected over a file. Locally, setting the environment via file is easier. Added additional npm script to run the server without the dotenv flag when running as a deployed application/container
Previously, npm watch only for changes to frontend
Initialize the authentication on the server to return the status of the auth. Disabled or not. In the front-end, if auth is disabled fake an admin user to allow all functionality
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Serve the React App from Node.JS Express to allow for a single deployment.
Recreate the React App without the "create-react-app" template to remove the built-in "magic" that comes with it.
Adjust server endpoints so they are expected (all dash endpoints in one place, auth in one place, etc)
App.js
controls the screen layout and site-wide state passed down to child components