Template to get started on a PERN stack Single Page Application (PostgreSQL, Express, React.js, Node.js)
ENV
variables from a .env
fileInstall Node Module with
$ npm install
Run Webpack build and tell webpack to continue to watch for changes
$ npm run watch
watch
script is used for developmnet. It "watches" your src/
directory
for any changes and rebuilds your React Client to Open another terminal window and start your server
$ npm start
webpack.config.js
- Our webpack configuration for bundlign our client application.babelrc
- Babel configuration filescripts/
- Contains scripts to be run at deployment (look into the package.json
to see where each script should be used)server.js
- Express server entry pointroutes/
- Empty directory to store all of your server's API routesmodels/
- Empty directory to store all of your modelsdb/
- Our database directory containing:
db.js
ENV
variables stored in our .env
fileschema.sql
psql -d <your_databaase> -f db/schema.sql
seeds.sql
psql -d <your_databaase> -f db/seeds.sql
src/
- Contains all of our React client's files
index.js
- The client application's entry point as defined in our webpack configcomponents/
- Directory to store all of our React components
App.jsx
- Our React applicaiton container componentApp.css
- Basic styling for the Hello World
application (check out the demo link of how to use css modules in the Technology Used section above)normaliz.css
- (Necolas's)[https://necolas.github.io/normalize.css/] CSS normalizeWebpack configuration inspired by Jason Seminara's React To Do Application