-
Notifications
You must be signed in to change notification settings - Fork 447
Run Servers Locally on OS X
-
Install Homebrew
-
Install Ruby
brew install ruby gem update --system gem update gem clean -
Install Foreman
gem install foreman
-
Install PostgreSQL
brew install postgresql -
Start PostgreSQL
In a separate Terminal window, run:
postgres -D /usr/local/var/postgresNote: Pressing Command-. stops PostgreSQL.
Minimize the window.
-
(Re)initialize the local
acani_chats_development&acani_chats_testdatabasesNote: This causes changes made to any of the
.sqlfiles to take effect.Warning: This deletes all data stored in both local databases.
Start PostgreSQL. Or, if PostgreSQL is already running, close all client connections to both databases, or just stop and restart PostgreSQL.
To (re)creates the local databases and their extensions, tables, and functions, run:
cd Servers/Database make # resets both databases make development # resets just the development database make test # resets just the test databaseNote: running
psql acani_chats_developmentconnects you to the local development database.
-
Set up the server
cd Servers/REST cp .env.example .env bundle install -
Run the tests
make test -
Start the server
foreman start
-
Install Node.js
brew install node -
Set up the chat server
cd Servers/Chats npm install -
Run the chat server
foreman start
To configure clients to talk to the local REST server, uncomment any lines in the client code containing the word localhost and restart.
Drag & drop the self-signed SSL certificate file located at Servers/REST/config/ssl/server.crt onto the running iPhone Simulator window.