DEV Community

Discussion on: Free Alternatives to Heroku

Collapse
 
jnv profile image
Jan Vlnas

Deta is nice, but you need to specifically design your app around their platform, like their serverless containers (Micros) and NoSQL database (Base). So Django and Postgres from the original question are nonstarters.

Collapse
 
sokhavuth profile image
Sokhavuth TIN • Edited

I just want to give some clue for people who want a free alternative to Heroku, not just to host Django and Postgres.

Talking about Deta Micros, it just two lines of code, that is it.

# to create a project locally and on Deta platform
deta new --python myproject

# to deploy the updated project to Deta
deta deploy
Enter fullscreen mode Exit fullscreen mode

The rest is the regular Python language and framework.

For Deta NoSQL database, there are only 6 methods to interact with the database.

put – Stores an item in the database. It will update an item if the key already exists.
insert – Stores an item in the database but raises an error if the key already exists. (2x slower than put).
get – Retrieves an item from the database by its key.
fetch – Retrieves multiple items from the database based on the provided (optional) filters.
delete – Deletes an item from the database.
update – Updates an item in the database.

Data entry in Deta Base is JavaScript object called "document" like in many other NoSQL databases.