Skip to content

Commit

Permalink
Upgrade server (#38)
Browse files Browse the repository at this point in the history
* add: new server

* add: docker for service

* add: docker

* upgrade: server for store pattern

* update: README of server

* Update: README
  • Loading branch information
tvc12 authored Sep 4, 2020
1 parent e16c6fa commit 6068e4f
Show file tree
Hide file tree
Showing 28 changed files with 1,468 additions and 399 deletions.
26 changes: 3 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,29 +82,9 @@ Install packages for `flutter` apps:
```sh
flutter packages get
```
Setup API:

* Upload file: ```index.php``` at ```store-pattern/server/Normal``` to your host.
* Edit ```index.php```
```php
$servername = "Your servername"; //recommend localhost
$username = "your username";
$password = "your password";
$dbname = "database name";
```
* Edit line 1 ```evn.dart``` at ```store-pattern/admin_app/lib/Constants/```
and ```store-pattern/order_app/lib/Constants/```

```dart
const String URL_EXECUTE = "your domain/index.php";
```

* Edit line 17 ```store-pattern/kitchen_app/src/Constants/Constant.java```

```java
public static String urlConnect = "your domain/index.php";
```
* Run script sql in your PhpMyAdmin ```store-pattern/database/mysql.sql```
### Setup API with php [see here](https://github.com/uiters/store-pattern/blob/e16c6fa32853c6c61a0c1fcbd9cde57d0241f073/README.md)

### Setup API with docker [see here](./server/README.md)

Run:

Expand Down
15 changes: 15 additions & 0 deletions server/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
FROM google/dart:latest
WORKDIR /app

COPY . /app

# Install dependencies, pre-build
RUN pub get

# Optionally build generaed sources.
# RUN pub run build_runner build

# Set environment, start server
ENV ANGEL_ENV=production
EXPOSE 3000
CMD dart bin/prod.dart --address=0.0.0.0
21 changes: 21 additions & 0 deletions server/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) 2016 angel-dart

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
48 changes: 0 additions & 48 deletions server/Normal/index.php

This file was deleted.

28 changes: 28 additions & 0 deletions server/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
### Store pattern server ✈

#### Getting start 👍

+ Step 1: Add username and password of MySQL in file `server/docker-compose.yml`

+ Step 2: Run script

```
docker-compose up -d
```

+ Step 3:

* Edit line 1 ```evn.dart``` at ```store-pattern/admin_app/lib/Constants/```
and ```store-pattern/order_app/lib/Constants/```

```dart
const String URL_EXECUTE = "your domain/";
```

* Edit line 17 ```store-pattern/kitchen_app/src/Constants/Constant.java```

```java
public static String urlConnect = "your domain/";
```

⚠ Becareful '/' at the last url
51 changes: 0 additions & 51 deletions server/Security/Model/Adapter.php

This file was deleted.

168 changes: 0 additions & 168 deletions server/Security/Model/Login.php

This file was deleted.

Loading

0 comments on commit 6068e4f

Please sign in to comment.