A simple NodeJS App debugging example in VS Code using Nodemon.
Note: Feel free to customize .vscode/launch.json
and ./nodemon.json
files.
yarn add nodemon --dev
/** Get an API response | |
* @param {String} message Message to return as part of the response | |
* @param {Object} data An object representing data returned as part of the API response. Default: `null` | |
* @param {Number} statusCode HTTP status code to be returned with this response. Default: `200` | |
* @return {Object} An API response object | |
*/ | |
const getResponse = (ok, message, data = null, statusCode = 200) => { | |
let response = { | |
ok, | |
message, |
// Reference: http://www.blackdogfoundry.com/blog/moving-repository-from-bitbucket-to-github/ | |
// See also: http://www.paulund.co.uk/change-url-of-git-repository | |
$ cd $HOME/Code/repo-directory | |
$ git remote rename origin bitbucket | |
$ git remote add origin https://github.com/mandiwise/awesome-new-repo.git | |
$ git push origin master | |
$ git remote rm bitbucket |