One Paragraph of project description goes here
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
-- | |
-- PostgreSQL database dump | |
-- | |
-- Dumped from database version 9.5.4 | |
-- Dumped by pg_dump version 9.5.4 | |
-- | |
-- Name: student; Type: TABLE; Schema: public; Owner: kimschlesinger | |
-- |
Ruby on Rails's Action Mailer allows you to preview an email view. It's a bit tricky, but if you'd like to see an email before it is sent to a user, follow the instructions below.
fetch(url) | |
.then(response => response.json()) | |
.then() | |
.catch(console.error) |
I have read/listened to/completed all of the following and found them useful. --Kim
// Thank you, Dan Levy | |
function domReady(f, o, m) { | |
(o = document), (m = 'addEventListener'); | |
o[m] ? o[m]('DOMContentLoaded', f) : ((o = window), o.attachEvent('onload', f)); | |
} | |
// example usage: | |
domReady(function() { |
//general: | |
COPY table_name TO 'location/here.csv' DELIMITER ',' CSV HEADER; | |
//specific: | |
COPY products_273 TO '/tmp/products_199.csv' DELIMITER ',' CSV HEADER; |
const express = require('express') | |
const app = express() | |
const path = require('path') | |
const fetch = require('node-fetch') | |
const PORT = process.env.PORT || 3000 | |
app.get('/api/user', (req, res) => { | |
res.json({ name: 'Richard' }); | |
}); |
const environment = process.env.NODE_ENV || 'development'; | |
const config = require('./knexfile'); | |
const environmentConfig = config[environment]; | |
const knex = require('knex'); | |
const connection = knex(environmentConfig); | |
module.exports = connection; |
How to setup a postgres db with knex
createdb <name_of_database>
knex migrate:latest
knex seed:run