-
Notifications
You must be signed in to change notification settings - Fork 13
Routing static assets
Serving a public resource in Kikaha is the same as serving any other HTTP request. Well, almost the same: it is easier! Basically, it mirrors the URI location sent as request to the web asset folder (usually configured as webapp
).
By default, routing static assets is disabled once Kikaha's design is focused on micro-services APIs. To enable you can set the server.static.enable
property to true
on your configuration file.
server:
static:
enabled: true
The kikaha-maven-plugin
is responsible for configure your web project, even if you just created an empty project. On projects created through the command line tool, and project that inherits the default kikaha-project, is possible to change the web folder by changing the property config.dir.web
on your pom.xml
file.
<properties>
<config.dir.web>my/new/webapp/folder</config.dir.web>
</properties>
If you manually created (or want to manually create) a maven project, you should configure the kikaha-maven-plugin
to point to the correct web folder.
<plugin>
<groupId>io.skullabs.kikaha</groupId>
<version>${KIKAHA-VERSION-HERE}</version>
<artifactId>kikaha-maven-plugin</artifactId>
<configuration>
<webresourcesPath>path/to/new/location</webresourcesPath>
</configuration>
</plugin>
WELCOME
About
Kikaha philosophy
GETTING STARTED
Getting started in 1 minute
Creating a Kikaha maven project
Architecture overview
TUTORIALS
Logging configuration
Configuring the server
Creating your first HTTP route
Kikaha's command line interface
Configuring your favorite IDE
Wro4j Integration
CircleCI Integration
CORE FEATURES
HTTP and HTTPS
Routing static assets
Dependency injection
Authentication and authorization
Smart routes
ESSENTIAL MODULES
μRouting API
WebSocket Routing
Database Connection Pool
JSON with Jackson
Protobuf
Mustache Templates
Rocker Templates
BCrypt
CLOUD MODULES
Overview of Cloud Modules
Consul.io
Codahale's Metrics
Auth0 Single Sign-On
μWorkers - Actor-like API
Hazelcast
AWS-RELATED MODULES
Overview of AWS-Related Modules
Deploying Applications on AWS
AWS IAM Credentials
AWS EC2
AWS SQS queues
AWS CloudWatch metrics
AWS Application Load Balancer
AWS Lambda functions
AWS X-Ray
ADVANCED TOPICS
Creating custom modules
Routing with Undertow's API
Creating custom cloud modules