STEP 1:
1.1:check node and npmis already installed or not.if not, install npm and node.
1.2: Create a new project with vite build command ,Enter your project name
1.3:Select framework "REACT".
1.4:Select a varient "TYPESCRIPT".
1.5:Now run the above three commands.

STEP 2:Check localhost:5173

STEP 3:Now our react spplication is created successfully.

STEP 4:Open the project in vs code then run the command "npm run build".This command compiles and bundles your source code and placed in a directory dist.
STEP 5:Create a bucket with unique name.


STEP 6:enable static web hosting.

STEP 7:Add bucket policy.

STEP 8:Now upload the files and folders from the dist folder in your bucket.

STEP 9:Go to properties,scroll down,you can find bucket website endpoint,then click it.

STEP 10:our react application is hosted in s3.

STEP 11:Now create a cloudfront distribution for hosting a react application.


STEP 12:Copy the distribution domain name and paste it in a new tab.Now we can see the same result.

STEP 13:Finally delete the cloud front distribution.

For further actions, you may consider blocking this person and/or reporting abuse
Top comments (0)