Code Monkey home page Code Monkey logo

csp-backend's Introduction

README

What is this repository for?

  • REST layer of CSP

How do I get set up?

To build project:

#!java

./gradlew clean build

To run project:

#!java

./gradlew flywayMigrate -i && ./gradlew bootRun -Dserver.port=8080

Migration:

If you want to create new table migration follow next steps:

  1. Go to /src/main/resources/db/migration

  2. Create new migration sql file with name V1_<version_migration>__<name_of_migration>.sql Example: V1_0__InitDataBase.sql

Note: If you don't set 2 bottom line after version_migration, migration won't work.

  1. Run : ./gradlew flywayMigrate -i, or you can run ./gradlew flywayMigrate -i && ./gradlew bootRun -Dserver.port=8080 and start server after migration.

Note: If you already had created database which was created without flyway, then you must remove all tables on your schema^ and the run command(which described above) in termminal.

Execute SQL files

dbInstall -DdbFiles=[List of files] Example: ./gradlew clean dbInstall build bootRun -Dserver.port=8080 -DdbFiles=therapist,users Note: The directory of SQL dumps is resources/db.test Check "Use insert commands" if you want to create own dumps. Run dbInstall task before using build/bootRun. You can run this command apart using grant: grant dbInstall -DdbFiles=therapist

###Run command###

Also you can update configs in when you run or build project throw terminal. Configs which you can update:

Command Description Default
-Dserver.port Server port 9090
-Dversion Build Version 0.7.3
-Demail Email host the-diabetes-cure.netfirms.com
-Ddb.user Databse username csp
-Ddb.pass Database pasword 9A6k3F6m
-Ddb.port Database port 5432
-Ddb.name Database name csp
-Ddb.host Database host localhost
-Dconf / -Pconf URL confFile application.yml

Example:

 -Dversion=1.0.0

Get application version:

#!java

/api/version

Contribution guidelines

  • Writing tests
  • Code review
  • Other guidelines

csp-backend's People

Contributors

bigshoesdev avatar

Watchers

 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.