Optional - Set format on save and any global prettier options
npm i -D eslint prettier eslint-plugin-prettier eslint-config-prettier eslint-plugin-node eslint-config-node
// Reference: http://lea.verou.me/2011/10/easily-keep-gh-pages-in-sync-with-master/ | |
$ git add . | |
$ git status // to see what changes are going to be commited | |
$ git commit -m 'Some descriptive commit message' | |
$ git push origin master | |
$ git checkout gh-pages // go to the gh-pages branch | |
$ git rebase master // bring gh-pages up to date with master | |
$ git push origin gh-pages // commit the changes |
// ---------------------------- | |
// Parent class (or superclass) | |
// ---------------------------- | |
class Circle { | |
constructor(x = 50, y = 50, r = 100, col = '#f00') { | |
this.x = x; | |
this.y = y; | |
this.r = r; | |
this.col = col; | |
this.vx = random(-5,5); |
let myCircle; | |
function setup() { | |
createCanvas(400, 400); | |
background(0); | |
// retrieve the x, y coords from the DB | |
fetch('/circle', {method: 'GET'}) | |
.then(function(response) { | |
if(response.ok) return response.json(); | |
throw new Error('Request failed.'); |
console.log('Client-side code running'); | |
const button = document.getElementById('myButton'); | |
button.addEventListener('click', function(e) { | |
console.log('button was clicked'); | |
fetch('/clicked', {method: 'POST'}) | |
.then(function(response) { | |
if(response.ok) { | |
console.log('click was recorded'); |
[nodemon] to restart at any time, enter `rs` | |
[nodemon] watching path(s): *.* | |
[nodemon] watching extensions: js,mjs,json | |
[nodemon] starting `babel-node src/server/server.js` | |
C:\Users\Tunji545\Downloads\React\Fulljs\src\public\bible.jpg:1 | |
���� | |
SyntaxError: Invalid or unexpected token | |
at wrapSafe (internal/modules/cjs/loader.js:1053:16) |
A Pen by Omisakin Olatunji on CodePen.
A Pen by Omisakin Olatunji on CodePen.
A Pen by Omisakin Olatunji on CodePen.
A Pen by Omisakin Olatunji on CodePen.