Git Product home page Git Product logo

monki-projects-api's Introduction

Monki Projects API

Tests

Overview

All of Monki Projects' APIs specifications (including this one's) are available in the mp-api-specs repository.

Environment variables

Environment variable
DATABASE_PORT
DATABASE_USERNAME
DATABASE_PASSWORD
DATABASE_NAME
ENABLE_JOBS
START_IN_PROCESS_JOBS
START_SCHEDULED_JOBS

How To Contribute

Run the project

  1. Clone the repository

    git clone https://github.com/MonkiProjects/monki-projects-api.git
  2. (Recommended) Integrate SwiftLint into your Xcode project to get warnings and errors displayed in the issue navigator

    swift package generate-xcodeproj
    open monki-projects-api.xcodeproj

    Follow SwiftLint's instructions to add a new build phase

  3. Setup PostgreSQL (easy way for macOS)

    This is the easiest way for macOS, you can do it differently if you prefer.

    1. Download Postgres.app at postgresapp.com and install it.

    2. Open the sidebar (if it's not already open) by clicking on the button in the bottom-left corner.

    3. Create a new server called "Vapor" in the directory ~/Library/Application Support/Postgres/vapor (you can put whatever you want at this step).

    4. Click Initialize

    5. Once your server is running, double-click on the postgres database to open it.

    6. Once in the SQL prompt, run

      CREATE DATABASE vapor_database;
      CREATE USER vapor_username WITH PASSWORD 'vapor_password';
    7. Close the shell (run exit to leave the SQL prompt if needed)

    8. You should see a new database called vapor_database

    The config you should have can be found in configure.swift, but here is a recap:

    Environment variable Value
    DATABASE_PORT 5432
    DATABASE_USERNAME vapor_username
    DATABASE_PASSWORD vapor_password
    DATABASE_NAME vapor_database

    If you change these settings, you will need to add environment variables to your scheme's Run and Test configurations.

  4. Run the project

    Two possibilities:

    • Open Package.swift
    • Open your monki-projects-api.xcodeproj, go to Product > Scheme and select the Run scheme

    From there, you will be able to run the project.

  5. Stop the app

    In XCode, hit the โ—พ button in the top-left corner or hit โŒ˜+. to stop the app. If you're running the app in a terminal, hit Ctrl+C.

  6. Stop the PostgreSQL server

    If you used Postgres.app, just open it and click Stop. Otherwise, manually stop it.

Tips

Fix port 8080 still open after stopping the app

For some reason, stopping the app causes an error preventing port 8080 to be closed, here is a command that kills it (tested on macOS):

lsof -t -i tcp:8080 | xargs kill

monki-projects-api's People

Contributors

remibardon avatar

Stargazers

 avatar

Watchers

 avatar  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.