-
- mkdir name-of-directory --- (making the file you're gonna do stuff in)
- cd name-of-directory --- (to go into it)
- mkdir server --- (a nice new server folder)
- touch .gitignore --- (blocks some crap from some crap)
- cd server --- (changes your working directory to this)
- mkdir public --- (public folder)
- touch server.js --- (a file of important javascrip things n' stuff)
- cd public --- (move into the public directory)
- touch index.html --- (here's your main html page!)
- mkdir scripts --- (here's a folder for your javascript you'll source)
- mkdir vendors --- (here's a folder for jQuery)
- mkdir styles --- (and, finally, a folder for your CSS )
- cd .. --- (goes up one level)
- cd .. --- (you've now gone UP two levels)
- code . --- (open all that stuff up in VS Code!)
-
- style.css to your styles directory
- client.js to your scripts directory
- jQuery (wherever you paste it from) into your vendors directory
-
- npm init --yes
- this initializes your PACKAGE JSON
- the --yes answers YES to all questions (a few will come in if you don't include this)
- npm init --yes
You SUDDENTLY have a file called package.json in your little tree on the left in VS Code!! Open 'er up.
-
npm install express
npm install pg
This will do some stuff to your tree and will drop a version at the bottom of your package.json file (mine says some crap ending with "express": "^4.17.1").
-
When we started using servers, we used type THIS stuff...
Now that we are using fancy databases and stuff, we do something more like THIS.
node_modules/
.DS_Store