added db migrations for users and initial data added first controllers added auth middleware added rest routes and controller stub ...
19 lines
370 B
TypeScript
19 lines
370 B
TypeScript
import BaseSeeder from '@ioc:Adonis/Lucid/Seeder'
|
|
import User from 'App/Models/User'
|
|
|
|
export default class extends BaseSeeder {
|
|
public async run () {
|
|
await User.createMany([
|
|
{
|
|
username: 'admin',
|
|
password: 'initialPass',
|
|
isAdmin: true
|
|
},
|
|
{
|
|
username: "firstUser",
|
|
password: "firstPass",
|
|
}
|
|
])
|
|
}
|
|
}
|