Skip to content
This repository was archived by the owner on Aug 18, 2021. It is now read-only.

Seeding test data

Gustavo Denis edited this page Oct 31, 2019 · 1 revision
Main > Using Liquid for building your application > Seeding test data

Data seeding allows to provide initial data to populate a database.

It's necessary create a .json file in a specific location to fill the database and collection previously created case it doesn't exists.

{
  "hotelId": 1,
  "userId": "[email protected]",
  "from": "2018-08-09T20:26:31.566Z",
  "to": "2018-08-09T20:26:31.566Z",
  "adults": 2,
  "kids": 3,
  "babies": 1,
  "roomType": 1,
  "price": 100
}

To call the reseed process, it will be necessary to call the URL is /reseed.

       http://localhost:5248/reseed
See how this is done in Liquid Hotel360 sample application.

Clone this wiki locally