Skip to content

Commit

Permalink
Change host from 3000 to 4741
Browse files Browse the repository at this point in the history
- Change all instances of host `3000` to `4741`

- Also updates `pg` to gem files
  • Loading branch information
BenGitsCode committed Oct 24, 2016
1 parent a0fa1f5 commit 17732c9
Show file tree
Hide file tree
Showing 10 changed files with 28 additions and 13 deletions.
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ gem 'rails-api'
gem 'active_model_serializers', '~> 0.10.0'
gem 'rack-cors', require: 'rack/cors'
gem 'rb-readline'
gem 'pg'
gem 'bcrypt', '~> 3.1.11'

group :production do
Expand Down
2 changes: 2 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ GEM
nokogiri (1.6.8)
mini_portile2 (~> 2.1.0)
pkg-config (~> 1.1.7)
pg (0.18.4)
pkg-config (1.1.7)
pry (0.10.4)
coderay (~> 1.1.0)
Expand Down Expand Up @@ -165,6 +166,7 @@ DEPENDENCIES
bcrypt (~> 3.1.11)
byebug (~> 8.2.2)
dotenv-rails (~> 2.1, >= 2.1.1)
pg
pry (~> 0.10.3)
pry-byebug (~> 3.3.0)
pry-rails (~> 0.3.4)
Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ correspond to API actions.
Request:

```sh
curl --include --request POST http://localhost:3000/sign-up \
curl --include --request POST http://localhost:4741/sign-up \
--header "Content-Type: application/json" \
--data '{
"credentials": {
Expand Down Expand Up @@ -106,7 +106,7 @@ Content-Type: application/json; charset=utf-8
Request:

```sh
curl --include --request POST http://localhost:3000/sign-in \
curl --include --request POST http://localhost:4741/sign-in \
--header "Content-Type: application/json" \
--data '{
"credentials": {
Expand Down Expand Up @@ -140,7 +140,7 @@ Content-Type: application/json; charset=utf-8
Request:

```sh
curl --include --request PATCH http://localhost:3000/change-password/$ID \
curl --include --request PATCH http://localhost:4741/change-password/$ID \
--header "Authorization: Token token=$TOKEN" \
--header "Content-Type: application/json" \
--data '{
Expand All @@ -166,7 +166,7 @@ HTTP/1.1 204 No Content
Request:

```sh
curl --include --request DELETE http://localhost:3000/sign-out/$ID \
curl --include --request DELETE http://localhost:4741/sign-out/$ID \
--header "Authorization: Token token=$TOKEN"
```

Expand All @@ -192,7 +192,7 @@ HTTP/1.1 204 No Content
Request:

```sh
curl --include --request GET http://localhost:3000/users \
curl --include --request GET http://localhost:4741/users \
--header "Authorization: Token token=$TOKEN"
```

Expand Down Expand Up @@ -225,7 +225,7 @@ Content-Type: application/json; charset=utf-8
Request:

```sh
curl --include --request GET http://localhost:3000/users/$ID \
curl --include --request GET http://localhost:4741/users/$ID \
--header "Authorization: Token token=$TOKEN"
```

Expand Down
12 changes: 12 additions & 0 deletions config/boot.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)

require 'bundler/setup' # Set up gems listed in the Gemfile.

# added to change default development port
require 'rails/commands/server'

module DefaultOptions
DEV_PORT = 'GA'.each_byte.reduce('') { |a, e| a + format('%x', e) }.to_i
def default_options
super.merge(Port: DEV_PORT)
end
end

Rails::Server.send(:prepend, DefaultOptions)
2 changes: 1 addition & 1 deletion scripts/change-password.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

curl --include --request PATCH http://localhost:3000/change-password/$ID \
curl --include --request PATCH http://localhost:4741/change-password/$ID \
--header "Authorization: Token token=$TOKEN" \
--header "Content-Type: application/json" \
--data '{
Expand Down
2 changes: 1 addition & 1 deletion scripts/sign-in.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

curl --include --request POST http://localhost:3000/sign-in \
curl --include --request POST http://localhost:4741/sign-in \
--header "Content-Type: application/json" \
--data '{
"credentials": {
Expand Down
2 changes: 1 addition & 1 deletion scripts/sign-out.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash

curl --include --request DELETE http://localhost:3000/sign-out/$ID \
curl --include --request DELETE http://localhost:4741/sign-out/$ID \
--header "Authorization: Token token=$TOKEN"
4 changes: 2 additions & 2 deletions scripts/sign-up.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

curl --include --request POST http://localhost:3000/sign-up \
curl --include --request POST http://localhost:4741/sign-up \
--header "Content-Type: application/json" \
--data '{
"credentials": {
Expand All @@ -10,7 +10,7 @@ curl --include --request POST http://localhost:3000/sign-up \
}
}'

curl --include --request POST http://localhost:3000/sign-up \
curl --include --request POST http://localhost:4741/sign-up \
--header "Content-Type: application/json" \
--data '{
"credentials": {
Expand Down
2 changes: 1 addition & 1 deletion scripts/user.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash

curl --include --request GET http://localhost:3000/users/$ID \
curl --include --request GET http://localhost:4741/users/$ID \
--header "Authorization: Token token=$TOKEN"
2 changes: 1 addition & 1 deletion scripts/users.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash

curl --include --request GET http://localhost:3000/users \
curl --include --request GET http://localhost:4741/users \
--header "Authorization: Token token=$TOKEN"

0 comments on commit 17732c9

Please sign in to comment.