This is a NextJs fullstack app built around the MVC architecture. This is done by leveraging tools such as Prisma for database modeling and Next-connect to the Api handling. To find out how to recreate this find it on Medium
- Create Note
- Updated Note
- Delete Note
git clone https://github.com/Ianodad/TakeNotes.git
create an .env file add the local or cloud base URI
DATABASE_URL="postgresql://USER:PASSWORD@HOST:PORT/DATABASE"
Install node_modules dependencies
npm install
Run application
npm run dev
Prisma helps app developers build faster and make fewer errors with an open source ORM for PostgreSQL, MySQL and SQLite. | Source
Create database table using prisma ORM
npx prisma db push
npx prisma generate
Allows you to interact with and manage your data interactively. For more visit prisma studio.
npm run studio
cd takenotes
docker build -t takenotes .
replace db url here with your postgress url in command below to run with docker
docker run --name takenotes -d -p 3000:3000 -e DATABASE_URL="db url here" takenotes:latest
The application will run on http://localhost:3000
Edit the docker-compose.yml replace db url here on DATABASE_URL with your local postgres url
docker-compose up --build
or
docker-compose up -d
MIT (c) 2021 Ian Adera