This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// node-postgres | |
const { Pool } = require('pg') | |
// Connection String | |
const config = { | |
connectionString: (process.env.NODE_ENV === 'production') ? process.env.DATABASE_URL : 'postgres://me:password@localhost:5432/database_name' | |
} | |
/* | |
==================================== |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var x = someOtherElement.offsetWidth / 3; | |
for(var i = 0; i < els.length; i += 1){ | |
els[i].style.width = x + 'px'; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// els is an array of elements | |
for(var i = 0; i < els.length; i += 1){ | |
var w = someOtherElement.offsetWidth / 3; | |
els[i].style.width = w + 'px'; | |
} |