Documente Academic
Documente Profesional
Documente Cultură
json
2) yarn add nodemon --dev (only for development) so that we can auto load the
server on change
3) make sure to go into package.json, add new script called "server" or w/e
3b) add one more for production called "start"
4) make the "start" command -> "node index.js"
make the "server" command -> "nodemon index.js"
5) add index.js
6) add in our dependencies (at the very least, express, knex, and sqlite3)
(maybe morgan, cors, helmet)
(for sessions and auth: bcryptjs, connect-session-knex, dotenv, express-session,
jsonwebtoken)
This should be all for setting up the files for code. For code, take a look at prev
projects. All
middleware needs to be added in and required, and then add endpoints. use
server.listen to check
if the server is responding and live.
// maybe put all this code into a data folder, along with my database!
For knex migrations:
thats it mostly for databases, and writing out your routes is the end of the road
for the api
1) create-react-app client
2) add a bunch of dependencies (MAKE SURE TO CD INTO THE CLIENT LOL)
3) yarn add react-router react-router-dom styled-components axios prop-types
styled-icons
3b) if redux? kys and then yarn add react-redux redux redux-thunk redux-logger:
live a long life