-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME
36 lines (32 loc) · 1.25 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
----
http://samuelstern.wordpress.com/2012/11/28/making-a-simple-database-driven-website-with-sinatra-and-heroku/
++++
Tutorial regarding how to create an application using sinatra and postgres
----
http://stackoverflow.com/questions/7975556/how-to-start-postgresql-server-on-mac-os-x
++++
how to start postgres server
(information can also be obtained using `brew info postgres`
pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start
how to stop postgres server
pg_ctl -D /usr/lcoal/var/postgres stop -s -m fast
how to get status of server
pg_ctl -D /usr/local/var/postgres status
get listen addresses
egrep 'listen|port' /usr/local/var/postgres/postgresql.conf
----
http://alvinalexander.com/blog/post/postgresql/how-start-postgres-postgresql-server-mac-osx
++++
to create a database
createdb [database-name]
----
http://alvinalexander.com/blog/post/postgresql/log-in-postgresql-database
++++
to connect to the database 'development'
psql development
to force psql to prompt for password
psql -d development -U [username] -W
----
http://superuser.com/questions/324616/how-should-i-set-the-path-variable-on-my-mac-so-the-hombrew-installed-tools-are
++++
Describes how to force OS to use brew-installed tools rather than default tools