Skip to content

πŸ„β€β™‚οΈ A node.js template to quickly get started building with Fastify and Prisma

Notifications You must be signed in to change notification settings

0xMukesh/hacky-node-template-v2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

hacky-node-template v2

πŸ„β€β™‚οΈ A type-safe Node.js template to quickly get started building with Fastify.

Tech-stack

  • Fastify - Fast and low overhead web framework, for Node.js.
  • Prisma - Type-safe ORM to ship code which doesn't break during production.
  • MongoDB - A NoSQL database.
  • pnpm - Fast, disk space efficient package manager

Getting started

  1. If you haven't installed pnpm yet then go ahead and install it via npm/yarn.

    yarn add -g pnpm # yarn
    npm install -g pnpm # npm
  2. Click on "Use this template" and you are ready to ship πŸ„β€β™‚οΈ

  3. Install all the dependencies via pnpm i command.

  4. Create .env file and add in your MongoDB connection URI

    DATABASE_URL=your-mongodb-connection-uri
    
  5. Open a new terminal window and run pnpm watch, this would re-build all the files on any kind of file changes under the src folder.

  6. Open a new terminal window and run pnpm dev, this would spin up a local development server at http://localhost:3000

  7. The database schema is stored within the prisma/schema.prisma file. If you want to have cross-file model relations, then you would need to use something like Prismix.

  8. Deploy your Node.js application to Railway within seconds

    Deploy on Railway

Made by @0xMukesh

About

πŸ„β€β™‚οΈ A node.js template to quickly get started building with Fastify and Prisma

Topics

Resources

Stars

Watchers

Forks