Code Monkey home page Code Monkey logo

game-love's Introduction

Game-Love

Building

fabric8io/docker-maven-plugin used in this project. You can check the plugin from fabric8io/docker-maven-plugin

this will create "game-love" image on your docker. also to start docker image you can use docker-compose file to create container and run

if you don't have docker on your pc, or you don't want to use docker just use this;

./mvnw clean install 

if you want to use docker, use(default docker.skip is true);

./mvnw clean install '-Ddocker.skip=false'

disable tests;

./mvnw clean install '-DskipTests'

Running Local

Disabling Security - local

if you want to disable security with jwt token you can do; changing application.yml -> "securityEnabled" value to false or,

./mvnw spring-boot:run '-Dspring-boot.run.arguments="--SECURITY_ENABLED=false"'

or just use with defaults

./mvnw spring-boot:run

Running on docker

NOTE: you must package with -Ddocker.skip=false for running docker image (it builds image) and also dont skip tests (build must be after tests)

Runnig the docker image (to disable security add "-e SECURITY_ENABLED=false" as docker environment )

docker run -i --rm -p 8080:8080 --name game-love game-love

Or use compose (to disable security change compose file):

docker compose up

Using the app: For swagger documentation; http://localhost:8080/swagger-ui/

If you enabled security; you must login first;

curl --location --request POST 'http://localhost:8080/auth/login' --header 'Content-Type: application/json' --data-raw '{"username": "admin","password": "admin"}'

And add this accessToken to header as "Authorization: " or "Authorization: Bearer " example request;

curl --location --request PUT 'localhost:8080/game/create' --header 'Authorization: eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJzYWlkIiwicm9sZXMiOiJBRE1JTixVU0VSIiwiaWF0IjoxNjM5OTQ3NDYzLCJleHAiOjE2Mzk5NTEwNjN9.AjINiESnOG9FMuwiwN19WA6ncli_X52X6LpDP8edZYo' --header 'Content-Type: text/plain' --data-raw 'Mario'

For using easily, I have added a postman collection: game-love-postman_collection.json

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.