Developer Docs

Setting Up Your Development Environment: Linux

The following steps will walk you through the process of setting up your development environment for the Ubuntu 18.04 Linux distribution. Approximate setup time is 30-40 minutes.

For this process, we recommend The Software Development Kit Manager to manage JVM dependencies and the Node version manager for managing Node.

SDK Man

  1. Install zip first.

     sudo apt-get install zip
    
  2. Install sdkman.

     curl -s "https://get.sdkman.io" | bash
    

    If this is successfully installed you should see the following success message.

    Image
  3. Add sdk to the path

     source "$HOME/.sdkman/bin/sdkman-init.sh"
    

    To persist this, append it to the end of your .bashrc file.

     echo source "$HOME/.sdkman/bin/sdkman-init.sh" > ~/.bashrc
    

Node version manager

Node version manager or NVM for short is used, as the name suggests, to manage versions of node on your system.

  1. Install NVM

     curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash
    
  2. Restart your shell or refresh or environment by running source ~/.bashrc

  3. Test that nvm was successfully installed by running nvm --version. You should see something like:

     0.38.0
    

Java

To install JDK 11 on Ubuntu 18.04, copy and paste the following into your terminal and press enter.

sdk install java 11.0.10.hs-adpt;

Depending on your Internet speed, this may take a while as packages are downloaded and installed. When the process is finished you should see something like this:

Image

Please Note: this is the Adopt Open JDK Build.

For troubleshooting, see the Adopt OpenJDK installation instructions.

Node

  1. Using nvm install version 12 of node.

    nvm install 12
    
  2. Set it as the default

    nvm use 12
    
  3. Test the version of node, run node --version, this should return a version number, at time of writing this was v12.22.3.

  4. (Optional) Install yarn as our package manager.

     npm install --global yarn
    

Angular

  1. (Optional) Install Angular CLI globally. This step is recommended for ease of use, but not strictly necessary. If you omit this step, all Angular CLI commands can be achieved by invoking the local version by prefixing all commands with npx, e.g. ng serve would become npx ng serve. To install, copy and past the following into your terminal and press enter:

    npm install -g @angular/cli@11.2.13
    

    After this has finished, running ng version should provide the following output:

         / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
        / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
        / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
        /_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
                        |___/
    
    
        Angular CLI: 11.2.13
        Node: 12.22.3
        OS: linux x64
    
        Angular:
        ...
        Ivy Workspace:
    
        Package                      Version
        ------------------------------------------------------
        @angular-devkit/architect    0.1102.13 (cli-only)
        @angular-devkit/core         11.2.13 (cli-only)
        @angular-devkit/schematics   11.2.13 (cli-only)
        @schematics/angular          11.2.13 (cli-only)
        @schematics/update           0.1102.13 (cli-only)
    

PostgreSQL

SpringBot is primarily built around using the PostgreSQL database, although it can use others. In this guide, we will only walk through the setup of a PostgreSQL database.

  1. To install, copy the following into your terminal and press enter:

    yes | sudo apt-get install postgresql postgresql-client-common
    
  2. To create a role, copy and paste the following into your terminal and press enter:

    sudo su postgres -c "psql -c \"CREATE ROLE codebots SUPERUSER LOGIN PASSWORD 'bots' \"" ;
    
  3. Create a database and assign our role to it. Copy and paste the following into your terminal and press enter:

    sudo su postgres -c "psql -c \"CREATE DATABASE "codebots"
    WITH OWNER "codebots"
    ENCODING 'UTF8'
    LC_COLLATE = 'en_US.UTF-8'
    LC_CTYPE = 'en_US.UTF-8'
    TEMPLATE template0;\"";
    

Gradle

Install Gradle 7.1 by copying and pasting the following command:

sdk install gradle 7.1

When this is complete you should see:

Done installing!


Setting gradle 7.1 as default.

This completes the server setup required to run your SpringBot application! You can now SpringBot Development Environment: Source Code to start editing your SpringBot application, then Running SpringBot on your SpringBot server!

Source Code

Complete the SpringBot Development Environment: Source Code lesson to setup your source code in your development environment.

On this page