Skip to content

danman01/react-test

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

General Assembly Logo

React Template

This project was bootstrapped with Create React App.

You can find the most recent version of the create-react-app guide here.

General Assembly has added a few nice-to-have to get your React project started, including:

  • react-router
  • Various scripts from our browser-template, like ability to deploy, lint, nag, and test. Check package.json for the scripts that are available, and run like:
    • npm run deploy script to deploy to github pages
  • bootstrap
  • sass

TODO:

  • add user authentication examples
  • add example resource CRUD with axios

Installation

Getting the template:

  1. Download this template.
  2. Move to the wdi/projects directory, then unzip the template directory with unzip /Users/<user-name>/Downloads/react-template-master.zip.

Customizing the Template:

  1. Rename the template directory from react-template-master to <project-name>-client.
  2. Empty README.md and fill with your own content.
  3. Replace all instances of react-template with the name of your project. This should occur in package.json name property.

Running the server:

  1. Install dependencies with npm install.
  2. When ready, start the server with npm start
  • This opens up a server on the default port
  • Set your default port to 7165 by making a .env file and setting PORT=7165

Git Init:

  1. Move into your new project and git init.
  2. Add all of the files in your project with the command git add --all.
    • Note: This is the only time you should run this command!
  3. Commit all of your files with the command git commit.
    • Your commit title should read Initial commit.

Pushing to github:

  1. Create a new repository on github.com, not GitHub Enterprise.
  2. Name the new repository with the same name used on Step 3.
  3. Follow the instructions on your new repository's setup page. For details on how to push to Github, refer to the section on Github entitled "…or push an existing repository from the command line." Further documentation can be found here.

Deploying your project:

  1. Replace the homepage property in package.json with your github pages site, "https://<github_username>.github.io/<your_project_name>/"
  2. Deploy to github pages by running npm run deploy
  • This script runs npm run build and pushes your code to your repo's gh-pages branch. If the script fails, you can investigate the script and run each command individually to discover the cause of the failure.
  1. All content is licensed under a CC­BY­NC­SA 4.0 license.
  2. All software code is licensed under GNU GPLv3. For commercial use or alternative licensing, please contact legal@ga.co.

About

test react deploy

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published