Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update README with more details #118

Open
michaeljoelt opened this issue Jul 28, 2022 · 2 comments
Open

Update README with more details #118

michaeljoelt opened this issue Jul 28, 2022 · 2 comments

Comments

@michaeljoelt
Copy link

michaeljoelt commented Jul 28, 2022

README needs to be updated with more details.

@michaeljoelt
Copy link
Author

michaeljoelt commented Jul 28, 2022

Here's my notes when getting started on this, in case it helps (feel free to use/edit as needed):

Original README

  • npm install
  • add DB_STRING to .env file

Updated README

Getting Started

  1. Go to todo-list-express repository(https://github.com/100devs/todo-list-express) and click "Fork" on the top right. This is basically "Save As"ing the project to your own GitHub.

  2. In your forked repository, click Code -> HTTPS -> copy the link

  3. Choose a location on your local PC where you want to create a copy of these files to work on. Use the terminal to access that location, and type: git clone [paste link from previous step]

  4. Now you can work on the code. The assignment is to comment every line. Probably start with server.js, then move to index.ejs, main.js, and style.css if you want.


Running the App

(Note: This technically isn't part of the assignment, but I'd like to get it working if possible...)

  1. Orginal README said: run "npm install" -> run this command from the terminal, while in your repository's folder

  2. Original README said: add DB_STRING to .env file -> create a file called ".env", and type DB_STRING=your MongoDB connection string.
    Note: If you need help, follow along with this article to get the connection string: https://zellwk.com/blog/crud-express-mongodb/#setting-up-mongodb-atlas. Then, add the connection string to the .env file like:
    DB_STRING=mongodb+srv://..... (continue with the full connection string. This is sensitive information, which is why it's being stored in the .env, and the .gitignore file lists ".env" so that it is not shared to the public github repository.)

  3. Start the node server by running this command in terminal within repository folder: node server.js
    Note: If running properly, the terminal will state:
    "Server running on port 2121
    Connected to todo Database"

  4. Open the application by going to http://127.0.0.1:2121/ or http://localhost:2121/ (the server is running on port 2121 on your local machine, which has the address of 127.0.0.1 (or localhost) when referring to itself)

@michaeljoelt
Copy link
Author

I created a pull request that addresses this. However, it also includes some commented code in other files.

I'm not sure if it's possible to just approve one file of a pull request? Let me know if it would help to submit a pull request that only updates the README.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant