Coder Social home page Coder Social logo

welfare-board-website's Introduction

#Welfare Board

Nodejs boilerplate

 This is just another nodejs boilerplate with docker and eslint configuration to make dev easier .

Skeleton

Here is the basic suggested skeleton for your app repo that each of the starter templates conforms to:

├── bin/www(server file)
├── controllers(all the views)
├── routes(all the routes)
├── models (all database models)
├── views
│    ├── **/*.js(ejs views)
├── public
    ├──uploads(all the media uploaded by user)
│   ├── css
│   │   ├── **/*.css
│   ├── images
│   ├── js
│   │   ├── **/*.js
│   └── partials/template
├── README.md
├── node_modules
├── Dockerfile
├── docker_compose.yaml
├── package.json
├── yarn.lock(if using yarn)
└── .gitignore

If you are using multer to save files on disc,configure it to save files inside pulblic>upload folder

Dev Setup

The docker files and environment variables are configured to be spin up mongo db inside one docker container and your applications inside another container.If you want to learn docker here is full tutorial

NOTE : Please do not remove the environment the variables already present inside the env file

  #To start the containers
  docker-compose up
  #Stop containers in diff terminal than docker
  docker-compose --volumes down
  #build docker images 
  docker-compose up --build #if there are changes in installed deps
  #faster builds
  COMPOSE_DOCKER_CLI_BUILD=1 DOCKER_BUILDKIT=1 docker-compose build
  #windows
  set "COMPOSE_DOCKER_CLI_BUILD=1" & set "DOCKER_BUILDKIT=1" & docker-compose build
  # or to make this permanent add following to docker daemon /etc/docker/daemon.json
  { "features": { "buildkit": true } }

Helpers:

  1. Remove dangling images: docker rmi $(docker images -f dangling=true -q ) -f
  2. Remove all volumes: docker volume rm $(docker volume ls -q)

Admin panel:

In dev you can use any valid email pass can be anything for login into admin panel make sure to remove those in product

Editor Setup

If you're using Visual Studio Code, you can install the ESLint extension, which will automatically highlight warnings and errors using this boilerplate.

  1. Press Ctrl + Shift + X or click the Extensions button
  2. Search for ESLint and Prettier(to format your code)
  3. Click the Install button next to the ESLint search result

With this extension, you can also choose to automatically fix/format your code when you save. Add the following to your Visual Studio Code settings.

"eslint.autoFixOnSave": true
"editor.formatOnSave": true,

This setting only takes effect if files.autoSave is set to off, onFocusChange, or onWindowChange.

welfare-board-website's People

Contributors

kunalsolanke avatar ayush3401 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.