Esteban Clouthier
Esteban Clouthier

Reputation: 177

Meaning of src, public, and build folders

I have recently started with programming, and I've just purchased a reactJs template, and the content comes ordered within folders named src, public and build; can you explain to me the reason of those folders? How does a web app work with those folders?

I ask this because I believe those names for folders are a de facto standard in web app coding.

Upvotes: 14

Views: 12198

Answers (1)

charlietfl
charlietfl

Reputation: 171679

Here's a simplistic rundown:

public means the web accessible root of the site. Basically whatever is in that folder can be opened from browser address bar. Server won't provide user access to files outside public

build is where compiled version of assets are placed when you run npm build. This is what will get delivered to user

src (short for "source") contains your working files that will be used later to create the build

Upvotes: 21

Related Questions