DEV Community πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’»

Cover image for In 7 lines of node.js - you can turn any database into Airtable like spreadsheet using NocoDB!
o1lab
o1lab

Posted on • Updated on

In 7 lines of node.js - you can turn any database into Airtable like spreadsheet using NocoDB!

So what is Airtable ?

Airtable is a low-code platform for building collaborative apps. It works like a part spreadsheet & part database.

How are we going to turn any database into Airtable like spreadsheet ?

Using NocoDB

Ok, What is NocoDB ?

NocoDB - The Open Source Airtable

Now, show me the code!

(async () => {
    const server = require('express')();
    const {Noco} = require("nocodb");
    server.use(await Noco.init({}));
    console.log(`Visit : localhost:${process.env.PORT}/dashboard`)    
    server.listen(process.env.PORT);
})()

Enter fullscreen mode Exit fullscreen mode

Let's break down the 7 lines.

(async () => {
    // require express 
    const server = require('express')();

    // require nocodb
    const {Noco} = require("nocodb");

    // mount nocodb as a middleware
    server.use(await Noco.init({}));

    // print 
    console.log(`Visit : localhost:${process.env.PORT}/dashboard`)    

    // listen to a port 
    server.listen(process.env.PORT);
})()

Enter fullscreen mode Exit fullscreen mode

Yes, that is it - simple, minimalistic & boring. Like the way it should be while trying something new.

How does it work internally ?

  • NocoDB depends on a database to store metadata about projects or spreadsheets. This can be specified using NC_DB environment variable. If NC_DB is absent then NocoDB defaults to SQLite storing this metadata.
  • NocoDB Projects can be created in two ways
    • First, on NC_DB database itself. Second, by connecting to external database.

Screen Shot 2021-09-28 at 12.36.13

So how to try this quickly ?

You can get started with just one command.

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

or

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

Where can I find more about the project ?

Please find our github below -> you can fork it / star it / twist it / turn it

GitHub logo nocodb / nocodb

πŸ”₯ πŸ”₯ The Open Source Airtable Alternative - Powered by Vue.js ❀️

NocoDB
πŸŽƒ The Open Source Airtable Alternative πŸŽƒ

Turns any MySQL, PostgreSQL, SQL Server, SQLite & MariaDB into a smart-spreadsheet

Build Status Node version Twitter

Website β€’ Discord β€’ Twitter

The Open Source Airtable Alternative - works on MySQL, Postgres SQL Server & MariaDB

NocoDB - The Open Source Airtable alternative | Product Hunt

Quick try

1-Click Deploy

Heroku

Deploy NocoDB to Heroku with 1-Click

Using Docker

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

To persist data you can mount volume at /usr/app/data/.

Using Npm

npx create-nocodb-app

Using Git

git clone https://github.com/nocodb/nocodb-seed
cd nocodb-seed
npm install
npm start

GUI

Access Dashboard using : http://localhost:8080/dashboard

Join Our Community


Screenshots

2

1

7

5

6

3

4

11

10

8

9

Features

Rich Spreadsheet Interface

  • ⚑ Β Search, sort, filter, hide columns with uber ease
  • ⚑ Β Create Views : Grid, Gallery, Kanban, Gantt, Form
  • ⚑ Β Share Views : public & password protected
  • ⚑ Β Personal & locked Views
  • ⚑ Β Upload images to cells (Works with S3, Minio, GCP, Azure, DigitalOcean, Linode, OVH, BackBlaze)
  • ⚑ Β Roles : Owner, Creator, Editor, Viewer, Commenter, Custom Roles.
  • ⚑ Β Access Control : Fine-grained access control even at database, table & column level.

App

…

Excellent, so how to join NocoDB community ?

πŸ“£ Github : https://github.com/nocodb/nocodb
πŸ“£ Discord : https://discord.gg/5RgZmkW
πŸ“£ Twitter : https://twitter.com/nocodb

Also, do you have a video demo ?

We do!

Using npx

Using docker

Now, just happy hacking!

Top comments (5)

Collapse
 
calag4n profile image
calag4n • Edited on

... any database ... => ... any SQL database ...

;)

Collapse
 
o1lab profile image
o1lab

Soon enough ;)

Collapse
 
calag4n profile image
calag4n

Really ? That'd be great !

Collapse
 
spiritupbro profile image
spiritupbro

this is so freaking cool

Collapse
 
o1lab profile image
o1lab

:)

Stop sifting through your feed.

Find the content you want to see.

Change your feed algorithm by adjusting your experience level and give weights to the tags you follow.