DEV Community

Cover image for How to build 7,000+ REST APIs within 2 mins (Node.js + MySQL) !!
o1lab
o1lab

Posted on β€’ Edited on

60 15

How to build 7,000+ REST APIs within 2 mins (Node.js + MySQL) !!

NocoDB is an open source Airtable alternative that instantly also generates REST APIs on any MySQL database!

For this example :
We will be using a fairly large mysql database (close to 400 tables) as input to NocoDB and create REST APIs automatically.

Without further ado-lets get into the gist of things.

Pre-requisites

  • Node.js or Docker
  • An existing MySQL database

Getting started

Using npx

npx create-nocodb-app
Enter fullscreen mode Exit fullscreen mode

Using Docker

docker run -d --name nocodb -p 8080:8080 nocodb/nocodb
Enter fullscreen mode Exit fullscreen mode

Now, let's see a quick demo

In the demo, NocoDB automatically first inferred the database schema then generated REST APIs for each table-and-relation with Swagger documentation! All of this was without write a single line of code.

Where can I find more details about NocoDB ?

GitHub logo nocodb / nocodb

πŸ”₯ πŸ”₯ πŸ”₯ Open Source Airtable Alternative

The Open Source Airtable Alternative

NocoDB is the fastest and easiest way to build databases online

Website β€’ Discord β€’ Community β€’ Twitter β€’ Reddit β€’ Documentation

video avi

See other languages Β»

Join Our Community



Stargazers repo roster for @nocodb/nocodb

Installation

Docker with SQLite

docker run -d --name noco 
           -v "$(pwd)"/nocodb:/usr/app/data/ 
           -p 8080:8080 
           nocodb/nocodb:latest
Enter fullscreen mode Exit fullscreen mode

Docker with PG

docker run -d --name noco 
           -v "$(pwd)"/nocodb:/usr/app/data/ 
           -p 8080:8080 
            # replace with your pg connection string
           -e NC_DB="pg://host.docker.internal:5432?u=root&p=password&d=d1" 
           # replace with a random secret
           -e NC_AUTH_JWT_SECRET="569a1821-0a93-45e8-87ab-eb857f20a010"  
           nocodb/nocodb:latest
Enter fullscreen mode Exit fullscreen mode

Auto-upstall

Auto-upstall is a single command that sets up NocoDB on a server for production usage. Behind the scenes it auto-generates docker-compose for you.

bash <(curl -sSL http://install.nocodb.com/noco.sh) <(mktemp)
Enter fullscreen mode Exit fullscreen mode

Auto-upstall does the following : πŸ•Š

  • 🐳 Automatically installs all pre-requisites like docker, docker-compose
  • πŸš€ Automatically installs NocoDB with PostgreSQL, Redis, Minio…

Does NocoDB support other databases ?

Yes - we do!

NocoDB does support all of the below databases :

  • Postgres
  • SQL-server
  • SQLite
  • MySQL & MariaDB.

Please join our community

FAQs

  • Is authentication built in ? Yes
  • Is ACL built in ? Yes
  • Is collaboration built in ? Yes
  • Are webhooks built in ? Yes
  • Is there an audit log ? Yes

More :

Hostinger image

Get n8n VPS hosting 3x cheaper than a cloud solution

Get fast, easy, secure n8n VPS hosting from $4.99/mo at Hostinger. Automate any workflow using a pre-installed n8n application and no-code customization.

Start now

Top comments (1)

Collapse
 
aravin profile image
Aravind A β€’

Misleading title. No relation between content and title

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

πŸ‘‹ Kindness is contagious

Please leave a ❀️ or a friendly comment on this post if you found it helpful!

Okay