GithubHelp home page GithubHelp logo

picturemyworld-server's Introduction

picturemyworld-server

Framework: Node.js

How to initialize and start the server

One script to rule them all! setup.py

usage: setup.py [-h] -e ENV [-i] [-d] [-c] [-r] [-t]

Initialize the NodeJS server for PictureMyWorld

optional arguments:
  -h, --help         show this help message and exit
  -e ENV, --env ENV  Configure the deployment environment.
  -i, --install      Install all node dependencies.
  -d, --delete       Delete the database for the given deployment environment.
  -c, --create       Create a new database for the given deployment
                     environment.
  -r, --run          Run the server.
  -t, --test         Run the Unit-Tests.

On first install execute:

./setup.py --env development --install --create

To delete the corresponding database execute:

./setup.py --env development --delete

And finally to run the NodeJs server, execute:

./setup.py --env development --run

Obviously you can use all arguments at once :]

Unit Tests

To setup (and reset) the test environment:

./setup.py --env development --install --delete --create

Add the --test argument to run the tests.

Postgres

Open Postgres in terminal:

psql -U postgres

Connect to database:

\c picturemyworld;

To list all databases:

\list

To list all tables:

\dt

List of dependencies

Name Version Summary
bcryptjs 2.4.3 To encrypt/decrypt the user password
body-parser 1.17.2 Parse incoming request bodies
pg 7.0.2 To interact with PostgreSQL
connect-pg-simple 4.2.0 To easy connect to PostgreSQL
express 4.15.3 Minimalist web framework
express-handlebars 3.0.0 View engine for Express
express-session 1.15.3 Session middleware
passport 0.3.2 For the login authentification
passport-local 1.0.0 Local username and password authentication strategy for Passport
sanitizer 0.1.3 To sanitize user input
multer 1.3.0 Middleware for handling multipart/form-data
config 1.26.1 Configurations for app deployments

To check and update dependencies

Run ncu to check the outdated dependencies:

$> ncu

 pg  ^6.2.3  โ†’  ^7.0.2

Run ncu with -u to upgrade package.json

ncu -u

External links:

picturemyworld-server's People

Contributors

kevindelord avatar

Watchers

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