Skip to content
/ client Public

Front end for the SOLSTICE content management system, which allows for adding/deleting news entries to our database

Notifications You must be signed in to change notification settings

katevc/client

Repository files navigation

SOLSTICE Content Management System Front-end

Running Locally:

To set up your project locally ensure that you have the "server" repo downloaded as well and running already (instructions on how to run provided in the README file for that project). NOTE: to get the server repo running correctly (i.e. ensure that you are connected to our solstice database), you will need to be connected to Michigan's VPN service (https://its.umich.edu/enterprise/wifi-networks/vpn/getting-started).

Once server is running, verify that you have a .env file in this project and that the environment variable REACT_APP_ENTRIES_API is defined with the port on your computer that the server is running on. For example, if my server is running on port 3001 (which is the default port defined by the project), REACT_APP_ENTRIES_API=http://localhost:3001/ should be contained in the .env file.

Now that your project is set up, use npm start to run the front end.

Uploading to Openshift

Within this repo, you can find a dockerfile, which outlines how the image we will upload to Openshift is built.

After logging in to the solstice project in Openshift, use the new-app command to upload the image to that project (you will need to do the same with the back-end).

Like before, you need to have the server project set up on Openshift and define an environment variable for where the server is running (this env variable is defined within the pod for the client). Make sure to create a route to the server (either in the openshift web app or via command line in your new-app command). Once you have that route, go to "Builds" on openshift, click on the pod for this client project (may be named client or whatever else you define) and go to "Environment Variables."

Within Openshift, to define the environment variable, in the name field enter REACT_APP_ENTRIES_API and in the value field, enter the full route of the server pod (this is a link - do NOT use the server's hostName as defined in Openshift).


This project was bootstrapped with Create React App.

Available Scripts

In the project directory, you can run:

npm start

Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.

The page will reload if you make edits.
You will also see any lint errors in the console.

npm test

Launches the test runner in the interactive watch mode.
See the section about running tests for more information.

npm run build

Builds the app for production to the build folder.
It correctly bundles React in production mode and optimizes the build for the best performance.

The build is minified and the filenames include the hashes.
Your app is ready to be deployed!

See the section about deployment for more information.

npm run eject

Note: this is a one-way operation. Once you eject, you can’t go back!

If you aren’t satisfied with the build tool and configuration choices, you can eject at any time. This command will remove the single build dependency from your project.

Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except eject will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own.

You don’t have to ever use eject. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.

Learn More

You can learn more in the Create React App documentation.

To learn React, check out the React documentation.

Code Splitting

This section has moved here: https://facebook.github.io/create-react-app/docs/code-splitting

Analyzing the Bundle Size

This section has moved here: https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size

Making a Progressive Web App

This section has moved here: https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app

Advanced Configuration

This section has moved here: https://facebook.github.io/create-react-app/docs/advanced-configuration

Deployment

This section has moved here: https://facebook.github.io/create-react-app/docs/deployment

npm run build fails to minify

This section has moved here: https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify

About

Front end for the SOLSTICE content management system, which allows for adding/deleting news entries to our database

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published