An API that returns informations about prime numbers | Uma API que retorna informações sobre números primos
DISCLAIMER: That´s my first project with Java, Gradle and Rest-API. All suggestions and pull-requests are welcome!
NOTA: Este é meu primeiro projeto com Java, Gradle e Rest-API. Todas as sugestôes e pull-requests são bem-vindos!
Usabilidade
The API, for a while, has three methods:
A API, até então, conta com três métodos:
- /allprimestill - A list with all prime numbers 'till
n
number;
- /allprimestill - Uma lista contendo todos os números primos até o número
n
;
- /nthprime - Returns the prime number position
n
;
- /nthprime -Retorna o número primos de posição
n
;
- /isprime - Returns a
true
if a number is prime andfalse
otherwise.
- /isprime - Retorna um
true
se um número é primo efalse
caso contrário.
Como rodar
- Clone or download the repository;
Clone ou baixe o repositório;
- Go to the folder where it was downloaded;
Vá até a pasta onde o projeto foi baixado;
- Build the project with the command
gradle bootJat
;
Use o comando
gradle bootJar
para "construir" o projeto;
- Go to
build
and later inlibs
;
Vá até
build
e depois emlibs
;
- Execute the
.jar
file with the commandjava -jar primes{version}.jar
;
Execute o arquivo
.jar
com o comandojava -jar primes{version}.jar
;
- Go to the port where it was initialized (localhost:8080 as default).
Vá até a porta onde o projeto foi inicializado (localhost:8080 por padrão).
A fazer
- Add path variables, header preferences or something, to make possible to choose the language.
- Adicionar path variables, preferências no header ou alguma outra coisa, para tornar possível escolhor o idioma.
- Divide the README.md in README.md and README-pt.md.
- Dividir o README.md em README.md e README-pt.md.