This is ABH DevDays demo app.
The following is a diagram of the app architecture:
Install the following:
-
Install nodejs (10.16.3), https://nodejs.org/en/download/
-
Install Java JDK 1.8
-
Install maven https://maven.apache.org/download.cgi
-
Install Postgres 11.5 (https://www.postgresql.org/download/)
-
Install Postgis https://postgis.net/install/
-
Create a
abh-restaurants
database in postgres -
Execute following on
abh-restaurants
database in postgres:
CREATE EXTENSION IF NOT EXISTS postgis;
CREATE EXTENSION IF NOT EXISTS "uuid-ossp";
-
(Optional) Docker (https://docs.docker.com/)
-
Install
ember-cli
by running:
npm install -g ember-cli
- Clone this repository by running:
git clone [email protected]:ATLANTBH/abh-restaurants.git
...or downloading project ZIP. For more on cloning see https://help.github.com/en/articles/cloning-a-repository.
The following should be executed to verify correct setup:
> java -version
java version "1.8.0_221"
Java(TM) SE Runtime Environment (build 1.8.0_221-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.221-b11, mixed mode)
> node -v
v10.16.3
> npm -v
6.9.0
> mvn --version
Apache Maven 3.6.2 (40f52333136460af0dc0d7232c0dc0bcf0d9e117; 2019-08-27T08:06:16-07:00)
Maven home: C:\opts\apache-maven-3.6.2\bin\..
Java version: 1.8.0_221, vendor: Oracle Corporation, runtime: C:\Program Files\Java\jdk1.8.0_221\jre
Default locale: en_US, platform encoding: Cp1252
> ember -v
ember-cli: 3.13.1
node: 10.16.3
os: win32 x64
OS name: "windows 7", version: "6.1", arch: "amd64", family: "windows"
> postgres --version
postgres (PostgreSQL) 11.5
> git --version
git version x.xx.x
If you have docker installed: start postgres database via docker/docker-compose:
cd webapp/deployment/local
docker-compose up
If you do not have docker installed: make sure you have postgres already started. To check if you have postgres setup correctly run the following:
psql -U postgres -d abh-restaurants -h localhost
For development, you can use IntelliJ (https://www.jetbrains.com/idea/download/) for backend and VSCode (https://code.visualstudio.com/download) for frontend.
Import the webapp
project from webapp/
directory in IntelliJ and start the web application by running main
method in the Application
class. If you want to run web application without importing into IntelliJ, run following:
mvn clean spring-boot:run -f webapp/pom.xml
Install dependency packages by running:
cd frontend/
npm install
in frontend/
directory.
Start the emberjs frontend by running:
ember s --proxy http://localhost:8080
Open http://localhost:4200 in browser. You can login as admin by using following credentials: [email protected]:admin
.