• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Kotlin/full-stack-web-jetbrains-night-sample: Full-stack demo application writte ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

Kotlin/full-stack-web-jetbrains-night-sample

开源软件地址(OpenSource Url):

https://github.com/Kotlin/full-stack-web-jetbrains-night-sample

开源编程语言(OpenSource Language):

Kotlin 97.6%

开源软件介绍(OpenSource Introduction):

kotlin-full-stack-application-demo

Fork of https://github.com/mkraynov/kfsad with the new Kotlin/JS Gradle Plugin

A full-stack demo application written in Kotlin for JetBrains Night Moscow 2019.

screenshot

Run application

  • ./gradlew :server:run will build optimized application bundle and run it on https://localhost:8080 (it takes some time to build optimized js bundle, so it is not useful for frontend development)
  • ./gradlew :client:run -t will run development application at https://localhost:8080 with live reload. It runs ktor and webpack dev servers under the hood:
    • Webpack dev server will be started at the front https://localhost:8080.
    • Ktor server will be spawned internally at https://localhost:8081 in separate gradle process (webpack devserver will start it)
    • Webpack dev server will call ktor for everything expect *.js files.

Distribution

  • ./gradlew :server:build will create server/build/distributions/server-0.1.1.zip. You can deploy it on the server and run bin/server to start the server. Client is included into the lib/server.jar

Description

This application displays a feed containing user-generated posts and comments. All data is stubbed by the fakeJSON and JSON Placeholder services.

It is a Kotlin Multiplatform project.

It uses:

During application startup posts are preloaded to the in-memory database from the fakeJSON (or JSON Placeholder) service. When the user requests the page, several posts are selected from the DB and the corresponding comments are fetched via the multi-platform HTTP client. Posts with comments are served to the client via RPC. After the initial render is done, information about authors is fetched via the client-side HTTP client and rendered after all coroutines terminate successfully. The "Load more comments" button fetches additional comments for the post using the multi-platform HTTP client.

This application has no error handling and has very limited RPC serialization. It's not meant for production use and serves only as a technology example.

Contact information

Please refer original repo: https://github.com/mkraynov/kfsad




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap