Skip to content

zhougsoft/mferspace

Repository files navigation

mferspace

a space for mfers

1 mfer token = 1 mferspace profile page

** please excuse the messy styling currently! still a ways to go in that department <3

requirements

  • a postgres database connection URL
    • you can quickly spin up a DB here or here - for free!
  • an alchemy or infura API key

to run

  1. install dependencies:

    npm install
    # or
    yarn
  2. make a copy of .env.example named .env

  3. assign your postgres database connection string to the DATABASE_URL environment variable

    #inside .env
    DATABASE_URL=postgresql://postgres:etc...
  4. run database setup migration (and optionally seed with test data):

    npm run db:up
    
    # optional test data
    npm run db:seed
  5. run local development server:

    npm run dev
  6. check out localhost:3000 in the browser!

database management

some npm scripts to interface with the database

# migrate the db up
npm run db:up

# migrate the db down
npm run db:down

# seed the db with test data
npm run db:seed

# drop & rebuild the db with seed data in one command
npm run db:reset