In order to create your own Wellms backend REST API you have few options
API Project with makefile
CLI and docker
Option 1. composer create
composer create-project escolallms/api wellms
- That creates a project in
wellms
folder
Option 2. Cloning repo
git clone git@github.com:EscolaLMS/API.git
- That creates a project in
wellms
folder
Using makefile
commands
Inside the folder run make init
There are some assumptions to make command above works file
- you have
docker
anddocker-compose
- ports defined in docker-compose.yml are free
This should install you default application with the following credentials
Role | Email ID | Password |
---|---|---|
Admin | admin@escolalms.com | secret |
Tutor | tutor@escolalms.com | secret |
Student | student@escolalms.com | secret |
Application will be accessible on http://localhost:1001 You should see API documentation (Swagger UI) at http://localhost:1001/api/documentation#/
Now you can add your code as you could in standard Laravel Application
Without docker
- Clone repo https://github.com/EscolaLMS/API on your machine
- Create your
.env
file base on the example .env.example - Follow the installation like standard Laravel Application installation
- Configure queues and scheduling
- Add
CORS
definition to your server (those are static files that are not handled by Laravel) for h5p files, see https://github.com/EscolaLMS/H5P#cors
Seeding content
- the only
essential
seeder is database/seeds/PermissionsSeeder.php which seeds all the permissions required by packages - if you use the above you need to create at least one admin. See commands sections in Auth package
- you can seed all the mock data with default DatabaseSeeder