Skip to content

defiantgoat/woowoofund-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

799a61c · Jun 27, 2021

History

18 Commits
Jun 21, 2021
Jun 21, 2021
Jun 27, 2021
Jun 27, 2021
Jun 22, 2021
Jun 27, 2021
Jun 27, 2021
Jun 22, 2021
Jun 27, 2021
Jun 19, 2021
Jun 27, 2021
Jun 19, 2021

Repository files navigation

WooWooFund API Application

Environment

The application was developed on a Mac running BigSur with the following environment:

  • Ruby v 2.7.3 (via rbenv)
  • Bundler v 2.1.4

Technologies Used

  • Ruby
  • Sinatra

Important Setup for Ubuntu 20.04

The api was run on an Ubuntu 20.04 virtual machine via VM Fusion.

  • I created a new VM and installed the following packages via apt:

  • build-essential

  • curl

  • file

  • git

  • imagemagick

  • libmagickwand-dev

  • ghostscript

  • I used RVM and installed Ruby v2.7.3

  • For the client, I installed nvm and installed v12.16.1

  • I then installed yarn via npm.

The API uses ImageMagick to convert PDF files to images. A functionality that has been disabled in Ubuntu and requires editing the ImageMagick policy.xml file. Run the following (if you need to on your machine of VM) A VM is recommended.

Update the ImageMagick policy.xml

  • Use whatever text editing method you like to edit the following file
  • /etc/ImageMagick-6/policy.xml
  • Comment out or delete the following line: <policy domain="coder" rights="none" pattern="PDF" />

To Run

  • Pull Repo to local environment
  • Run the following at the project's root
    • Run bundle install to install required Gems
    • Run ruby start_rackup to start the application in local development mode
    • The application will run at http://localhost:9292/api/

Known Issues and Limitations

  • API uses JWT for authentication.
  • As a POC, no database was created, instead a flat JSON file is used to store and retreive data for the client.
  • The Dockerfile needs to be updated to account for the ImageMagick policy issues and to install ImageMagick and Ghostscript in the image.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published