API
  • 21 Jul 2020
  • 1 Minute To Read
  • Contributors
  • Print
  • Share
  • Dark
    Light

API

  • Print
  • Share
  • Dark
    Light

Hostman allows you to deploy your API fairly easily. Use these instructions to run the API for your programming language:

Database

iconfinder_017_064_cloud_data_base_database_rack_server_backup_2328996.png

Your data must be stored in a database. Hostman provides you with out-of-the-box databases: PostgreSQL, MySQL and MongoDB. When you deploy them using Hostman, you see the database requisites right in your Dashboard.

Other supported databases

We have other databases in our backlog. If you would like us to implement support for your database, please email us.

You can also install any other database using a Docker container.

File storage

iconfinder_folder_286705.png

If you are not planning to scale your API, you can use local storage to store your files. Use persistent storage for files that will not be deleted between deploys.

When you need to scale your service, it's important to store files outside the node. There are many different options.

We recommend using GridFS. GridFS is the MongoDB specification for storing and retrieving large files such as images, audio files, video files, etc. It is a file system designed for storing files, but the data is stored in MongoDB collections.

To use GridFS you need to deploy MongoDB and install the GridFS driver for your programming language.

Queue

You may want to delegate tasks to a background worker. The best way to do this is to use a queue.

Launch Kafka or RabbitMQ to send tasks to a background worker.

Was This Article Helpful?