Giter Site home page Giter Site logo

gundupooja / findit Goto Github PK

View Code? Open in Web Editor NEW

This project forked from denisecase/findit

0.0 1.0 0.0 643 KB

A geo-location based game for exploration

Home Page: https://findit-nest.herokuapp.com/

License: Apache License 2.0

JavaScript 23.96% TypeScript 26.73% CSS 0.78% EJS 48.52%

findit's Introduction

findit

Codacy Badge Known Vulnerabilities

A geo-location based game for exploration

Links

Stack

  • NestJS
  • TypeScript
  • Prisma
  • Postgres (production)
  • Heroku
  • Heroku Postgres
  • EJS View Engine

Security

Audits

Create from Scratch

  1. GitHub new repo, with README, .gitignore (Node), license
  2. Clone down to local machine
  3. Open PS in repo.
  4. Move to parent folder, mk dir temp.
  5. cd into temp, run nest new findit.[1]
  6. Let it run, copy files into my repo, not overwriting this README.
  7. Add install/run/test commands (from temp Nest README).
  8. Run locally:
  9. npm install --save dotenv
  10. Run locally (see above).
  11. Verify and stop.
  12. If needed, complete git setup. If TortoiseGit:
    • settings / git / remote /
    • add name and email
    • settings / git / credential
    • config type: local
    • Helper: wincred
    • Click Add New/Save, then Apply
  13. Git add / commit / push new content:
    • git add .
    • git commit -m "updates here"
    • git push origin main
  14. nest generate resource location - answer prompts:
    • REST API
    • Y (yes, generate)
  15. Create favicon (e.g., Favicon.io)
    • Text / Rounded / Orienta / 45 / #FFF / #F0F / Download (zip)
  16. Change default response to Express view
    • npm install --save ejs
    • Create ./public/images - add favicon zip contents
    • Create ./public/styles - add style.css
    • Create ./views with footer.ejs, header.ejs, index.ejs
    • src/main.ts - enable Express, folders, view engine
    • src/app.controller.ts - prepare for view response
    • src/app.service.ts - provide view name (index)
  17. Heroku needs version in package.json and start script
    • update package.json
    • add Procfile (web: npm run start:prod)
  18. Add Prisma to support SQLite, Postgres, Atlas

Installation

npm install

After changing data schema

npm run drop
npm run prisma:in
npm run db:push
npm run prisma:generate
npm run seed

Run the app

# development
npm run start

# watch mode
npm run start:dev

# production mode
npm run start:prod

Test

# unit tests
npm run test

# e2e tests
npm run test:e2e

# test coverage
npm run test:cov

Heroku

heroku update
heroku logs --app findit-nest --tail
heroku open --app findit-nest
heroku pg:psql postgresql-trapezoidal-45903 --app findit-nest

Prerequisites for Publishing

Create Heroku app with Heroku Postgres (Hobby Dev - free) add-on.

  • Heroku / Apps / New / Create new app / set name / create
  • Deploy method / GithHub / set to your repo / connect
  • Automatic deploys / click "Enable Automatic Deploys"
  • Heroku / This-Heroku-app / Overview / Configure addons / Find more addons / Heroku Postgres / Install Heroku Postgres / Hobby Dev-Free / findit-nest (use your app name) / Submit order form
  • Heroku / This-Heroku-app / Settings / Reveal config vars (verify DATABASE_URL exists)
  • Heroku / This-Heroku-app / Deploy / Manual deploy / "Deploy Branch"
  • Heroku / This-Heroku-app / Overview / watch latest activity / View build progress (watch for any issues)
  • Heroku / This-Heroku-app / Open app
  • Errors? Heroku / This-Heroku-app / More / View logs
heroku logs -n 200 -a findit-nest

References

findit's People

Contributors

denisecase avatar codacy-badger avatar snyk-bot avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.