git clone https://github.com/RHoKAustralia/berry-street.git
If you are on windows, make sure you are using UNIX line endings as most of the tools will inside a linux docker container.
The quickest way to get the application up and running on your local machine is using Docker
Once you have Docker installed,
Go to the root directory of the project and run
$ docker-compose build
this will create all the containers for the application.
Note. This is going to take a while to complete. The good news is it's only when done for the first time.
Now that everything is installed, run
$ docker-compose up
Go to
http://localhost
Note this is different from what the terminal states http://127.0.0.1:80 will not work only localhost will.
To stop the application, just hit Ctrl+C
You will need to have Java 8 installed on your system and also groovy and gradle. SDKMAN! is a good option to install the latter two.
In a terminal, run
$ docker-compose up neo4j
This will start the neo4j container.
In another terminal you can run
$ cd api
api$ ./gradlew bootRun
to start up the backend api; And then, you can test it through its swagger interface or using any other REST Client, like Postman
If you want to use an IDE like IntelliJ Idea (this is the preferred one) or Eclipse, you can generate the appropriate project files by running
api$ ./gradlew idea
api$ ./gradlew eclipse
and then import the project in the IDE
In a terminal, run
$ docker-compose up api
This will start the backend api and neo4j containers.
In a second terminal
$ cd frontend
frontend$ npm install
frontend$ npm run dev
Go to
http://localhost:8081
For a supercharged frontend dev experience, make sure you have these Chrome extensions installed:
There are some helpful examples to help understand the way that Neo4J interfaces with the API code in the Neo4J tutorial
Windows 7: If you see this
←[91m/bin/sh: 1: ./gradlew: Permission denied
←[0m←[31mERROR←[0m: Service 'api' failed to build: The command '/bin/sh -c ./gradlew build jar' returned a non-zero code: 126
then you can try running the api on its own, and using docker to run everything else:
docker-compose.yml
to comment-out (#) the api
section, and the link to it in frontend/links
.docker-compose build
then docker-compose up
as below.gradlew bootRun
to start the api