Skip to content

bennettdcsm/DGME250_Website

Repository files navigation

Step 1: Install Node.js and npm

Why? React projects use npm (Node Package Manager) to install dependencies. npm comes bundled with Node.js, so installing Node.js is all you need.

How to Install:

1. Check if Node.js and npm are installed:

Open your terminal (Command Prompt on Windows, Terminal on macOS/Linux) and type:

node -v

npm -v

If you see version numbers (like v16.14.0), then you have them installed. If not, follow the next steps.

2. Download Node.js:

Go to the official Node.js website https://nodejs.org/en

Download the LTS (Long Term Support) version, which is recommended for most users.

3. Install Node.js:

Windows: Run the downloaded installer and follow the prompts.

macOS: Open the downloaded .pkg file and follow the installation instructions.

Linux: Use your distribution’s package manager or download the binaries from the Node.js website. For example, on Ubuntu, you might run:

sudo apt update

sudo apt install nodejs npm

4. Verify the installation:

After installation, run:

node -v

npm -v

You should see version numbers indicating that Node.js and npm are installed successfully.


Step 2: Clone the GitHub Repository

Now that you have npm installed, you can clone your React project from GitHub.

1. Open your terminal and navigate to the directory where you want the project.

2.Run the clone command:

Replace your-username/your-react-project with your repository’s actual URL.

3.Navigate into the project directory:

cd your-react-project


Step 3: Install Project Dependencies

In the project directory, run the following command to install all necessary packages:

npm install

This command reads the package.json file and downloads all the required dependencies.


Step 4: Start the Development Server

Once the dependencies are installed, you can start the development server by running:

npm start

This command launches your React app in development mode.

Open http://localhost:3000 in your browser to view the app.

The app will automatically reload if you make any code changes.

Additional Steps

Running Tests If your project includes tests, you can start the test runner with:

npm test

This launches tests in an interactive watch mode.

Building for Production When you're ready to deploy your app, build an optimized production version by running:

npm run build

This creates a build folder with the minified, production-ready files.

You can then deploy these static files to your preferred hosting provider.


Start React App

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 your browser.

The page will reload when you make changes.
You may 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.

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

DGME250_Website

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •