Skip to content

A demo of nodejs, express+typescript+swagger, Postgres, Jupyter labs,nextjs+typescript+tailwind

License

Notifications You must be signed in to change notification settings

contactandyc/store_demo

Repository files navigation

express / postgres / typescript demo

This is a demo using express+swagger+typescript, postgres, nextjs+typescript+tailwind, and jupyter labs to enable panda style querying of the data. The data is fake and in general I've included useful ChatGPT responses where relevant.

Credits...

  • ChatGPT 3.5 and 4.0 for many code ideas
  • Dalle-3 for image generation
  1. First, update Homebrew to the latest version:
brew update
  1. Install PostgreSQL with Homebrew:
brew install postgresql
  1. Once the installation is complete, you can start the PostgreSQL service:
brew services start postgresql
  1. To create a new database and start using PostgreSQL, you can use the createdb command:
createdb store_demo
  1. Create tables and load mock data
cd db
psql store_demo < create_tables.sql
cd ..
  1. Install npm packages
cd express
npm install

If npm isn't installed, you can install nvm using homebrew using guide from here

brew install nvm
source $(brew --prefix nvm)/nvm.sh
nvm install node
  1. Start express
npm run start

If all is good, check out http://localhost:3000/api-docs !

Sometimes, it gives me a blank screen when on Safari, but Chrome seems to consistently work

Store Demo

Jupyter Lab to explore data

Create a virtual environment

python3 -m venv venv

Activate the environment

source venv/bin/activate

Install packages (requirements has commonly used packages)

pip install -r requirements.txt

Start Jupyter Labs

jupyter lab --notebook-dir=notebooks

Deactivate

deactivate

About

A demo of nodejs, express+typescript+swagger, Postgres, Jupyter labs,nextjs+typescript+tailwind

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published