- npm
- node
npm init
nodemon server.js
- mongod --dbpath /Users/Shared/Previously_Relocated_Items/Security/data/db
- Comment out the mongoose in app.js to proper one for local
- node app.js
- Setting up a dynamic website
- Using mongoose to set up schema
- Setting up partials through ejs which can be reused on multiple pages
- Had to update the logout function https://stackoverflow.com/questions/72336177/error-reqlogout-requires-a-callback-function
For the plant keys, I wrote a bash script which takes in the text file
of a specifically formatted binomial plant key, extracts the parts and places them into a
JSON file form (example). This JSON file is then used to extract the specific information as the user
clicks through the answers to the binomial questions.
- Turn pdftotext
- Order each sentence onto separate lines (result must be separated at end by '. . . .', sentence must start with #[letter])
- Use rin_group_extractor (/usr/local/bin) script , will need to have it here so $PATH calls it and can access it from anywhere in the terminal
- Will need to type type the name of the file when asked (so need to call in the folder where file located so it can access)
- Place into public/scripts/plant_keys
- Place import statement into the plant route
- Place into the keys object which is used to access the keys
- Add new object to the /keys route with parameters {name,group} which are passed to the keys index page where people can choose which key they want
- Will be called in the /plant/keys/:param route and accessed depending on which parameter given (:param) --> keys[:param]
- Have to add the value and type to the model
- Change the show.ejs file
- Change the new.ejs file
- Change edit.ejs file
- Add property to the create route and insert into the object created
https://stackoverflow.com/questions/7117073/add-a-tooltip-to-a-div
- Using MochaJS
-
Chai npm install --save-dev chai chai-http
npm test