Giter Site home page Giter Site logo

inayath-hussain / playpower-backend Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 48 KB

Backend assignment for powerplay-labs

Home Page: https://playpower-backend.vercel.app

Dockerfile 1.25% Shell 0.28% TypeScript 98.47%
docker expressjs nodejs typescript postgresql prisma

playpower-backend's Introduction

PlayPower labs backend assignment

Tech used

  • Express
  • Postgresql
  • prisma
  • Docker

Api Documentation

Link for api documentation - POSTMAN

Steps to run project locally

Clone this repository and run npm install from the base dir of the repo.

Create a postgres db and once the installation is done run command npx prisma migrate dev from the base dir to create table according to prisma schema. Schema can be found in prisma/schema.prisma.

Now run npm run build to build the project.

Create .env file at the base dir and add necessary key value pairs. All the required keys can be found in src/config/env.ts file.

Now run node dist/server.js.


Steps to build and publish docker image

You need docker and docker-compose installed in your machine.

Create docker hub account. And login to the account using cli docker login.


Build your Docker image from your Dockerfile. Make sure you tag it with your Docker Hub username and repository name.

docker build -t your-username/your-repository-name:tag .


Push your Docker image to Docker Hub.

docker push your-username/your-repository-name:tag


Steps to run app inside docker

Run docker-compose up to run the app in a docker container.

If you are running the app for first time inside a docker or made changes to code then add --build flag. docker-compose up --build.

playpower-backend's People

Contributors

inayath-hussain avatar

Watchers

 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.