2021-07-17 04:52:48 +00:00
# ORM Starter Application for Angel3 framework
2021-06-11 04:08:20 +00:00
2021-07-17 04:52:48 +00:00
This is an ORM starter application for [Angel3 framework ](https://pub.dartlang.org/packages/angel3_framework ) which is a full-stack Web framework in Dart. The default database is `postgresql` . `mysql` support is still in active development.
2016-12-27 14:28:48 +00:00
2021-07-17 04:52:48 +00:00
## Installation & Setup
2018-12-11 03:36:14 +00:00
2021-07-17 04:52:48 +00:00
1. Download and install [Dart ](https://dart.dev/get-dart ).
2. Install `postgresql` version 9, 10, 11 or 12. **postgresql 13 is not working as the driver do not support SCRAM**
3. Create a new user and database in postgres using `psql` cli. For example:
2019-10-09 18:24:56 +00:00
2021-07-17 04:52:48 +00:00
```sql
postgres=# create database appdb;
postgres=# create user appuser with encrypted password 'App1970#';
postgres=# grant all privileges on database appdb to appuser;
```
2019-10-03 01:21:08 +00:00
2021-07-17 04:52:48 +00:00
4. Update the `postgres` section in the `config/default.yaml` file with the newly created user and database name.
2017-06-05 17:01:45 +00:00
2021-07-17 04:52:48 +00:00
```yaml
postgres:
host: localhost
port: 5432
database_name: appdb
username: appuser
password: App1970#
useSSL: false
time_zone: UTC
```
2017-04-02 20:32:03 +00:00
2021-07-17 04:52:48 +00:00
### Development
2017-04-02 20:28:22 +00:00
2021-07-17 04:52:48 +00:00
1. Run the following command to start Angel3 server in dev mode to *hot-reloaded* on file changes:
2017-04-02 20:28:22 +00:00
2021-07-17 04:52:48 +00:00
```bash
dart --observe bin/dev.dart
```
2017-04-02 20:32:03 +00:00
2021-07-17 04:52:48 +00:00
2. Modify the code and watch the changes applied to the application
2017-04-02 20:32:03 +00:00
2021-07-17 04:52:48 +00:00
### Production
2017-04-02 20:32:03 +00:00
2021-07-17 04:52:48 +00:00
1. Run the following command:
2017-04-02 20:38:20 +00:00
2021-07-17 04:52:48 +00:00
```bash
dart bin/prod.dart
```
2017-04-02 20:38:20 +00:00
2021-07-17 04:52:48 +00:00
2. Run as docker. Edit and run the provided `Dockerfile` to build the image.
2017-04-02 20:32:03 +00:00
2021-07-17 04:52:48 +00:00
## Resources
2019-04-18 16:18:39 +00:00
2021-07-17 04:52:48 +00:00
Visit the [Developer Guide ](https://angel3-docs.dukefirehawk.com/guides ) for dozens of guides and resources, including video tutorials, to get up and running as quickly as possible with Angel3.
2019-04-18 16:18:39 +00:00
2021-07-17 04:52:48 +00:00
Examples and complete projects can be found [here ](https://github.com/dukefirehawk/angel3-examples ).
2019-04-18 16:18:39 +00:00
2021-06-11 04:00:10 +00:00
You can also view the [API Documentation ](https://pub.dev/documentation/angel3_framework/latest/ ).
2017-04-02 20:32:03 +00:00
2021-06-11 04:00:10 +00:00
There is also an [Awesome Angel :fire: ](https://github.com/dukefirehawk/angel3-awesome ) list.