Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Global Monki Projects API

License

NotificationsYou must be signed in to change notification settings

MonkiProjects/monki-projects-api

Repository files navigation

Tests

Overview

All of Monki Projects'APIs specifications (including this one's) are available in themp-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) IntegrateSwiftLint into your Xcode project to get warnings and errors displayed in the issue navigator

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

    FollowSwiftLint'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 atpostgresapp.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. ClickInitialize

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

    6. Once in theSQL prompt, run

      CREATEDATABASEvapor_database;CREATEUSERvapor_username WITH PASSWORD'vapor_password';
    7. Close the shell (runexit to leave the SQL prompt if needed)

    8. You should see a new database calledvapor_database

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

    Environment variableValue
    DATABASE_PORT5432
    DATABASE_USERNAMEvapor_username
    DATABASE_PASSWORDvapor_password
    DATABASE_NAMEvapor_database

    If you change these settings, you will need to add environment variables to your scheme'sRun andTest configurations.

  4. Run the project

    Two possibilities:

    • OpenPackage.swift
    • Open yourmonki-projects-api.xcodeproj, go toProduct > Scheme and select theRun 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, hitCtrl+C.

  6. Stop the PostgreSQL server

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

Tips

Fix port8080 still open after stopping the app

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

lsof -t -i tcp:8080| xargskill

[8]ページ先頭

©2009-2025 Movatter.jp