Code Monkey home page Code Monkey logo

gms's Introduction

License: MIT   Build Status   Coverage Status  

Table of Contents

Overview

The project consists of two main (independent) modules:

You can collaborate on any of them independently by modifying only the module you would like to change.

Ready for production

  • Packing as a WAR file with the API server only

    1. You need Java 8 in order to generate the WAR and a servlet container (such as Apache Tomcat) in order to deploy it.
    2. From the location server/ run gradle bootWar.
  • API + Angular Client

    1. You need to have Node.js 8.9 or higher, together with NPM 5.5.1 or higher installed.
    2. Consider modifying the file client/src/environments/environment.prod.ts, by setting the value apiBaseUrl to the value of the API base url. This takes as default http://127.0.0.1/gms/api/.
    3. From the location server/ run gradle bootWar -Pclient=true.
    4. Optionally you can modify other behaviors for the client app while generating the WAR using the following commands:
    • client, use -Pclient=true for generating the client Angular app.

    • clientDoc, use -PclientDoc=true for generating the client app documentation.

    • clientDependencies, use -PclientDependencies=true for (re)installing all node dependencies before creating the WAR. Use this options if it is the first time you create the WAR file. Once the dependencies have been installed this can be safely skipped next time.

    • clientDeployUrl, use -PclientDeployUrl=<deploy-url> for specifying the base url were the WAR will be deployed. This is where the static resources will be allocated by the Angular app. For example, supposing the WAR is deployed under a domain www.example.com under the sub-domain sub1 (full path would be www.example.com/sub1), you should set as <deploy-url> the value /sub1/.

    • clientBaseUrl, use -PclientBaseUrl=<base-url> for specifying the base url for resolving all the resources (js, css, images, etc). Generally it can be set to the same value as the <deploy-url> and its default values is ./.

      • An example of build with the first two parameters enabled to true would be gradle bootWar -Pclient=true -PclientDoc=true.
  • This will create a WAR file inside server/build/libs ready to be deployed.

  • Database configuration

    1. Create a PostgreSQL database.
    2. Open the WAR file and set the proper connection parameters inside the file WEB-INF/classes/config/application-production.properties
    3. Save the file and update it inside the WAR file.
    4. Deploy the WAR file.

Note: If you don't have Gradle installed, you can use the command ./gradlew instead of gradle for the previous mentioned steps.

How to start developing

  • Make a local working copy of the project ( git clone https://github.com/lealceldeiro/gms.git).

IntelliJ IDEA

API Server module

  • Open (import) the folder server in the working copy of the project.

Image: Open server folder

Image: Select server folder

  • Configure the gradle options.

Image: Configure gradle options

  1. Select the distribution of gradle to be used. The default option is "Use default gradle wrapper", but if you like you can check the "Use local gradle distribution" if you have gradle installed on your PC (in which case you must set the "Gradle home" directory.
  2. Select the JVM.
  3. Select the project format (.idea (directory based) in this case).
  • This will create an IntelliJ IDEA project with one module (server). Here you should choose to add the root directory to the VCS.

Image: Server module ready

Client module

  • Open Module Settings (F4) and add a new module (+ green sign) and select the Import Module option.

Image: Open module settings

Image: Add new module

  • Select the folder client in the same level of the server folder.

Image: Select client folder

  • Select the option "Create module from existing source".

Image: Select options create module from existing source

  • Next.
  • In the window "Import Module", keep the checkbox checked and click "Next";

Image: Select next in the Import Module option

Image: Select options create module from existing source

  • This will create another module on the project (client).

Image: Select options create module from existing source

At this point the project should contain two modules (server and client)

gms's People

Contributors

lealceldeiro avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.