forked from loco-rs/loco
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request loco-rs#611 from dinosath/5150_default_port
feat: change default port to 5150
- Loading branch information
Showing
39 changed files
with
69 additions
and
69 deletions.
There are no files selected for viewing
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
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
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
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
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
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
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -87,7 +87,7 @@ $ cargo loco start | |
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ | ||
https://loco.rs | ||
listening on port 3000 | ||
listening on port 5150 | ||
``` | ||
<!-- </snip> --> | ||
|
||
|
@@ -140,7 +140,7 @@ $ cargo loco start | |
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ | ||
https://loco.rs | ||
listening on port 3000 | ||
listening on port 5150 | ||
``` | ||
<!-- </snip> --> | ||
|
@@ -150,13 +150,13 @@ Next, try adding a `post` with `curl`: | |
$ curl -X POST -H "Content-Type: application/json" -d '{ | ||
"title": "Your Title", | ||
"content": "Your Content xxx" | ||
}' localhost:3000/posts | ||
}' localhost:5150/posts | ||
``` | ||
You can list your posts: | ||
```sh | ||
$ curl localhost:3000/posts | ||
$ curl localhost:5150/posts | ||
``` | ||
For those counting -- the commands for creating a blog backend were: | ||
|
@@ -200,7 +200,7 @@ $ cargo loco doctor | |
The `/api/auth/register` endpoint creates a new user in the database with an `email_verification_token` for account verification. A welcome email is sent to the user with a verification link. | ||
```sh | ||
$ curl --location '127.0.0.1:3000/api/auth/register' \ | ||
$ curl --location '127.0.0.1:5150/api/auth/register' \ | ||
--header 'Content-Type: application/json' \ | ||
--data-raw '{ | ||
"name": "Loco user", | ||
|
@@ -216,7 +216,7 @@ For security reasons, if the user is already registered, no new user is created, | |
After registering a new user, use the following request to log in: | ||
```sh | ||
$ curl --location '127.0.0.1:3000/api/auth/login' \ | ||
$ curl --location '127.0.0.1:5150/api/auth/login' \ | ||
--header 'Content-Type: application/json' \ | ||
--data-raw '{ | ||
"email": "[email protected]", | ||
|
@@ -241,7 +241,7 @@ The response includes a JWT token for authentication, user ID, name, and verific | |
This endpoint is protected by auth middleware. | ||
```sh | ||
$ curl --location --request GET '127.0.0.1:3000/api/user/current' \ | ||
$ curl --location --request GET '127.0.0.1:5150/api/user/current' \ | ||
--header 'Content-Type: application/json' \ | ||
--header 'Authorization: Bearer TOKEN' | ||
``` | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -52,7 +52,7 @@ The `/api/auth/register` endpoint creates a new user in the database with an `em | |
##### Example Curl Request: | ||
|
||
```sh | ||
curl --location '127.0.0.1:3000/api/auth/register' \ | ||
curl --location '127.0.0.1:5150/api/auth/register' \ | ||
--header 'Content-Type: application/json' \ | ||
--data-raw '{ | ||
"name": "Loco user", | ||
|
@@ -70,7 +70,7 @@ After registering a new user, use the following request to log in: | |
##### Example Curl Request: | ||
|
||
```sh | ||
curl --location '127.0.0.1:3000/api/auth/login' \ | ||
curl --location '127.0.0.1:5150/api/auth/login' \ | ||
--header 'Content-Type: application/json' \ | ||
--data-raw '{ | ||
"email": "[email protected]", | ||
|
@@ -101,7 +101,7 @@ Upon user registration, an email with a verification link is sent. Visiting this | |
#### Example Curl request: | ||
|
||
```sh | ||
curl --location '127.0.0.1:3000/api/auth/verify' \ | ||
curl --location '127.0.0.1:5150/api/auth/verify' \ | ||
--header 'Content-Type: application/json' \ | ||
--data '{ | ||
"token": "TOKEN" | ||
|
@@ -117,7 +117,7 @@ The `forgot` endpoint requires only the user's email in the payload. An email is | |
##### Example Curl request: | ||
|
||
```sh | ||
curl --location '127.0.0.1:3000/api/auth/forgot' \ | ||
curl --location '127.0.0.1:5150/api/auth/forgot' \ | ||
--header 'Content-Type: application/json' \ | ||
--data-raw '{ | ||
"email": "[email protected]" | ||
|
@@ -131,7 +131,7 @@ To reset the password, send the token generated in the `forgot` endpoint along w | |
##### Example Curl request: | ||
|
||
```sh | ||
curl --location '127.0.0.1:3000/api/auth/reset' \ | ||
curl --location '127.0.0.1:5150/api/auth/reset' \ | ||
--header 'Content-Type: application/json' \ | ||
--data '{ | ||
"token": "TOKEN", | ||
|
@@ -144,7 +144,7 @@ curl --location '127.0.0.1:3000/api/auth/reset' \ | |
This endpoint is protected by auth middleware. | ||
|
||
```sh | ||
curl --location --request GET '127.0.0.1:3000/user/current' \ | ||
curl --location --request GET '127.0.0.1:5150/user/current' \ | ||
--header 'Content-Type: application/json' \ | ||
--header 'Authorization: Bearer TOKEN' | ||
``` | ||
|
@@ -209,7 +209,7 @@ The `/api/auth/register` endpoint creates a new user in the database with an `ap | |
#### Example Curl Request: | ||
|
||
```sh | ||
curl --location '127.0.0.1:3000/api/auth/register' \ | ||
curl --location '127.0.0.1:5150/api/auth/register' \ | ||
--header 'Content-Type: application/json' \ | ||
--data-raw '{ | ||
"name": "Loco user", | ||
|
@@ -252,7 +252,7 @@ To request an authenticated endpoint, you need to pass the `API_KEY` in the `Aut | |
#### Example Curl Request: | ||
|
||
```sh | ||
curl --location '127.0.0.1:3000/api/user/current-api' \ | ||
curl --location '127.0.0.1:5150/api/user/current-api' \ | ||
--header 'Content-Type: application/json' \ | ||
--header 'Authorization: Bearer API_KEY' | ||
``` | ||
|
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
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
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
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
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
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
Oops, something went wrong.