Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 590
Esteban Clouthier Avatar asked Sep 10 '18 23:09

Esteban Clouthier


Video Answer


1 Answers

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

like image 98
charlietfl Avatar answered Oct 20 '22 08:10

charlietfl