Git Product home page Git Product logo

dwd-sample-readme's Introduction

Dynamic Web Development Class Final Project

Part of your final assignment is to post your code on Github. This will allow anyone interested in learning NodeJS to use your code as an example while getting started.


List of requirements for the Final project submission:

Create a Github Repository for your existing project.

You can find out how to create a repo, http://help.github.com/create-a-repo/

When you have created a repo you can add a new Git remote path, allowing you to push your code to Github. We use remote paths now when we push to Heroku

To add the Github remote path, adjust the following command to match your repo's address

git remote add origin [email protected]:GitHubUsername/YourRepoName.git

Create a README file

A Github repository can have a README file. This is the quick-guide, instruction manual for using the repo. You can create a README file with plain text or give some styles with Markdown Syntax

Save your README file to your root directory (same level as web.js and package.json)

Your README should include

  • A link to working example on Heroku.com

  • What your code does when the server is started.

  • What dependencies are required to run the code

    • Package.json
    • Any Heroku add-ons like MONGOLAB or CRON
  • List your routes, what URLs are made available when your server is turned on.

  • How can a person run your code, what is the command to start the server.


REMOVE SENSITIVE INFORMATION FROM CODE (RESET YOUR REPO)

If you had any passwords in your code, you should remove them and place them in your .env file. For example in your .env file you have a MONGOLAB_URI variable

MONGOLAB_URI=mongodb://.....

You can access this variable in your code with the statement (when using foreman start)

process.env.MONGOLAB_URI

Your .env file should be included in your .gitignore file

RESET THE REPO

Once you have moved sensitive passwords out of your repo. You can reset your repo by removing the .git directory and reinitalizing the repo. In your code directory in terminal, remove the .git directory

You only need to do this if you have any passwords in your code (outside your .env file)

THIS WILL REMOVE ALL COMMIT HISTORY FROM YOUR REPO

rm -rf .git

Now you can re-initialize the repo knowing that your passwords will not be in the history. In your code directory in terminal.

git init
git add .
git commit -am "reinit"

Now add in the remote paths to PUSH to Heroku and Github, you must replace with your REPO information

git remote add heroku [email protected]:YOUR-HEROKU-APP.git
git remote add github [email protected]:GITHUB_USERNAME/GIT-REPO.git

When finished - push your code repository to Github

--force command will push

git push --force github

dwd-sample-readme's People

Contributors

johnschimmel avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.