/BlogRest

Primary LanguageJavaScript

BlogRest

This application is used to create and manage a blog. The technical task is described in Technical Task. You can see the specification here

Necessary tools

Getting started

Clone this repo to your local machine using:

git clone https://github.com/JavaBraveWarriors/BlogRest.git

This project uses two profiles. Profiles determine what the connection to the database will be. If you don't specify a profile, the dev profile will be activated by default.

  • dev is used for development
  • prod is used for production server Example:
mvn -Pdev <comands>
mvn -Pprod <comands>

To run the application on the embedded Jetty server, go to the project root and execute the following commands:

mvn -Pdev clean install 
cd rest/
mvn -Pdev jetty:tun

Production deployment

  • In the settings.xml file ($M2_HOME/conf/settings.xml) write the settings for access to the server. Example:
 <server>
    <id>apache-tomcat</id>
    <username>tomcat-manager</username>
    <password>password</password>
  </server>

Node: server identifier in the settings.xml file must match the identifier in pom.xml in the root of the plugin project "tomcat7-maven-plugin".

  • When the settings are completed, run the following commands:
mvn -Pprod clean install tomcat7:deploy -Dserver.deploy.port=${YOUR_CUSTOM_PORT}

  • If you want to redeploy the project:
mvn -Pprod clean install tomcat7:redeploy -Dserver.deploy.port=${YOUR_CUSTOM_PORT}

Node: ${YOUR_CUSTOM_PORT} is the port on which tomcat is running.

Technology stack

Links