Skip to content
This repository has been archived by the owner on May 9, 2019. It is now read-only.

Pre-load a few users and items #110

Open
rstento opened this issue Jun 26, 2017 · 4 comments
Open

Pre-load a few users and items #110

rstento opened this issue Jun 26, 2017 · 4 comments
Assignees

Comments

@rstento
Copy link
Contributor

rstento commented Jun 26, 2017

It is cumbersome to create multiple users and at least one item before you can actually exercise the app and bid on something. It would be nice to add a script that loads a few users and items so that someone who downloads and runs online auction could observe the main functionality right away. They could still add other users and items if they wish.

@lakhina
Copy link
Contributor

lakhina commented Jun 29, 2017

@rstento @TimMoore So should we pull it depending on if it is in development env then run that script on base of env var?

@TimMoore
Copy link
Contributor

We can check if it's dev mode using this Play API: https://playframework.com/documentation/2.5.7/api/java/play/Environment.html#mode--

Here's an example in the Lagom framework: https://github.com/lagom/lagom/blob/7956d9b3532ff79c9247182de92fe43d94270cc9/logback/src/main/scala/com/lightbend/lagom/internal/logback/LogbackLoggerConfigurator.scala#L58

The Environment can be injected into a class constructor. The only question is what would be the best place to put all of the setup code? Maybe in the web-gateway app? I'm not sure.

@lakhina
Copy link
Contributor

lakhina commented Jul 13, 2017

@rstento I will work on it soon

@lakhina lakhina self-assigned this Jul 13, 2017
@TimMoore
Copy link
Contributor

This library might be helpful https://github.com/DiUS/java-faker

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

No branches or pull requests

4 participants