mathias21 / ktoreasy Goto Github PK
View Code? Open in Web Editor NEWSuggested Ktor architecture
License: GNU General Public License v3.0
Suggested Ktor architecture
License: GNU General Public License v3.0
Current watch pattern from application.conf is not working. Need to check why.
Dear Sir
very thx your post https://medium.com/@math21/testing-a-ktor-server-part-i-route-testing-84f8e82454d7 & demo
i have QA
as the code
Line 30 in 06568a6
i can start a ktor server at normal mode ( src)
i look the test sourceSet
you craete a test demo
KtorEasy/test/ApplicationTest.kt
Line 10 in 06568a6
if i export " embeddedServer(Netty, port = config.port) {...}" as a class (Yes i want run ktor serve at Andorid or other JVM like)
how let us test this class at Test mode ? or how start embeddedServer at Test ?
THX
Dear Sir
very thx your demo
i also ref other demo
this one use extra config file : "application.$environment.conf"
if i run ktor server at android with the same config
do you know how load ?
because "ConfigFactory.load" base on ClassLoader
THX
I want to propose a BaseApi
, which will handle querying of data:
fun <T> dbQuery(block: () -> T): T
Currently, this is handled in BaseController
. See this line.
By doing this, Controller won't be concerned about transactions and 'how' the data is fetched. That part will be the API duty to provide the requested data.
I can make a PR for this.
Dependencies seem to be outdated. It could be interesting to bump them to newer ones.
First, thanks for the great reference to get into KTOR.
I have been stumbeling across these lines in the Dockerfile
# Creating user
ENV APPLICATION_USER 1033
RUN adduser -D -g '' $APPLICATION_USER
Is there any specific reason you choose to run the application with a different user (other than not running containers as root)?
I'm working on a Multi-Secret-Santa side-project. I'm not sure if your familiar with the concept, but basically a group of people are secretly assigned another member of the group to give a gift at Christmas. The problem with that was that when last year multiple families got together to do their secret santa thing, they all happened to be given members from their own family. It's not a huge problem but it sort of defeats the purpose of it.
So my goal is to build a secret-santas matcher to mitigate the above problem. I've created a DB diagram with a bunch of junction tables: https://dbdiagram.io/d/616c66dc940c4c4eec9968d9
The junction tables are used to allow a user to be part of multiple groups, and a group to have multiple users.
In summery:
User = User
Group = Group of people who are not supposed to be each other's secret santa
Party = Multiple groups.
Constraint:
A member of a group cannot be the secret santa of another member of the same group.
So, on to my question:
Where (and how) would I place the join selects in your architecture? I thought of putting it in the GroupAPI, but it doesn't quite feel right to have it at that level. Should I use it in the UsersGroupDao? But how would I make use of the UserDao and GroupDao to create the joins?
Any input would be greatly appreciated! In the mean time, I'm going to watch the videos you mentioned in my other issue :)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.