Save a stray's life. Put dogs and cats up for adoption or adopt your own pet.
PleasantPaws is a website made to bring a community together to find homes for stray animals.
Made with Node.js and MongoDB. Uses vanilla HTML and CSS on frontend.
Ensure MongoDB is installed. The MongoDB .bson files have been exported with mongodump and placed in /db/PleasantPawsDB.
Using MongoDB Database Tools: in the root directory, restore the "PleasantPawsDB" database files locally with the mongorestore tool.
If in project root directory, and mongorestore.exe is present or added to PATH, run this command:
mongorestore -d PleasantPawsDB db/PleasantPawsDB
See MongoDB Database Tools download page and documentation for more help.
Ensure Node.js and npm are installed. Run
npm install
in project root directory to install dependencies.
Create an environment variable with an access token secret required for authorization with JWT.
A suggested way to do so is to generate 64 random bytes with Node's built in crypto module. In any terminal, run "node", then run the following command:
require('crypto').randomBytes(64).toString('hex')
After obtaining your secret, place it into an environment variable as follows:
-
Create a file named ".env" in project root
-
Paste the environment secret so the contents of the file look like this:
ACCESS_TOKEN_SECRET=abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234
In project root, run
node app
to start the server.
Access the website from any browser at localhost:3000.
Sign up with a new account, or log in with one of the dummy accounts included in accounts.txt.