Skip to content

secfix/backend-task-implementation-repo

Repository files navigation

Getting Started

  • System requirements
    • JDK 17
    • Gradle
  • Start the dev server.
    gradle bootRun
    

Verify That Everything Is Set Up Correctly

You can use cURL or a tool like Postman to test the API.

Example Curl Commands

You can log in as one of the seeded users with the following curl command:

curl --location --request POST 'localhost:8080/api/login' \
--header 'Content-Type: application/json' \
--data-raw '{
    "username": "thomas",
    "password": "123456"
}'

Then you can use the token that comes back from the /login request to make an authenticated request to create a new blog post

curl --location --request POST 'localhost:8080/api/posts' \
--header 'x-access-token: your-token-here' \
--header 'Content-Type: application/json' \
--data-raw '{
    "text": "This is some text for the blog post...",
    "tags": ["travel", "hotel"]
}'

Common Setup Errors

  • If you see gradle bootRun get stuck with a message "80% EXECUTING", please check if there is a log message "Started BlogPostsApplication in *.** seconds". Your server is running is you see this log.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages