Giter Site home page Giter Site logo

ide-backend's Introduction

Coding Blocks IDE Backend

Backend app for Coding Blocks IDE

Steps to run locally

Please ensure you have the following installed:

node.js

npm

postgres

Install project dependencies:

npm install

You'll now have to setup a blank database and credentials in Postgres. The database will be configured by the schema automatically. If you're not familiar with this, please use the "Further Reading" section.

Inside the folder util, copy the contents of environment.sh.example into a new file named environment.sh. Modify the contents of this file as per the credentials and database name you setup in postgres.

npm start

Project Stucture

The project has been created express.js and therefore has a similar structure to all express.js apps.

routes/ –  Contains all routes split as per their catergory into their respective files
views/  – Jade templates for all the views
util/ – Contains database and environment configuration files
public/ – Contains assets served along with the webpages

Set up on Docker

Create the docker image for the ide-backend from the Dockerfile

docker build -t ide-backend .

Run this image in a container using the docker-compose file

-To run in terminal and follow

docker-compose up ide-backend

-To run as background process

docker-compose up -d ide-backend

Port 3000 in docker is mapped with localhost:3000 so you can run this app from localhost:3000.

If you wish to run other apps such as ide frontend or judge api with this, connect this docker container with those via docker network - 'ide-backend-network'. Check the docker file for more details.

Further Reading

express.js

Setup Postgresql database and users

ide-backend's People

Contributors

jatinkatyal13 avatar abhishek97 avatar architkshk avatar ashvary avatar omerjerk avatar prabalsingh24 avatar prajjwal avatar championswimmer avatar thenamankumar avatar tarunluthra123 avatar ananay 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.