GithubHelp home page GithubHelp logo

abewartech / activej-example Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 0.0 2.29 MB

showcases the powerful capabilities of ActiveJ, a cutting-edge Java framework designed for building high-performance, scalable, and reactive applications.

Home Page: https://activej.io/

Java 47.11% CSS 15.76% JavaScript 9.05% HTML 28.08%

activej-example's Introduction

ActiveJ Real World Project

This project is for learning ActiveJ Framework, run on JDK 17

Information

Logo

ActiveJ is the best performance framework in Java on February 27, 2023.

Libraries

This project use:

  • io.activej: ActiveJ Framework
  • dsl-json-java8: JSON serialization with high performance
  • logback-classic: For logging
  • lombok: For useful annotations
  • hibernate-hikaricp: Work with database
  • mysql-connector-java: For Mysql 8.0
  • liquibase-core: For migrating at runtime

View pom.xml for more details

Before run

Install JDK 17

Install MySQL v8

Setup database: Replace your config to file app.properties

Run

On the local, run main file: AppLauncher.java

On the dev/production, run commands:

-> Build: maven package -DskipTests=true
-> Run:   java -Denv={dev/prod} -jar AppLauncher.jar
-> Build native: native-image -R:MaxHeapSize=2g --verbose --target windows -jar AppLauncher.jar

The application runs on port: 8080

GraalVM

https://www.graalvm.org/22.1/reference-manual/native-image/Resources/

-> 1. Build via native-image: native-image --verbose -jar AppLauncher.jar
This way is simple without config

-> Build via maven: maven -Pnative -DskipTests=true package
Complicate with more configs

API Reference

Homepage (public)

  GET http://localhost:8080

Health check (public)

  GET http://localhost:8080/api/v1/health-check

Login (public)

  GET http://localhost:8080/api/v1/login

Create a new session to access private router

Add user (public)

  POST http://localhost:8080/api/v1/users
JSON Body Type Description
name string Required
age int Required

List all users (private)

  GET http://localhost:8080/api/v1/users

If you don't login, you won't access this router

Get one user (private)

  GET http://localhost:8080/api/v1/users/${userId}

If you don't login, you won't access this router

activej-example's People

Stargazers

 avatar  avatar

Watchers

 avatar

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.