Coder Social home page Coder Social logo

shop-server's Introduction

CIBuild Status

Vigo-Shop server

This is an open-source node server app for vigo-shop online store.

It`s built using:

  • Node
  • Express
  • Mongo DB, mongoose
  • AWS S3 as file storage (aws-sdk, multer-s3)
  • JWT token auth, (jsonwebtoken, passport)
  • Mailgun for emailing
  • Joi, validator for validation
  • Eslint, Postman, Newman, Travis CI
  • GIT, GitHub, Jira as a workflow

To start server locally:

You must have your own environment variables. Just add .env file to project root folder. Use .env.example file with guiding comments in it.

To do that you should have your AWS, MailGun, Mongo, LiqPay accounts for filling API keys.

After proper configuration run the command below:

npm run start

Testing

To test REST APIs just import ../postman/VigoShop_postman_collection.json file in your locally installed Postman. Or fork public Postman collection.

Set environment variables in ../postman/VigoShop_postman_collection.json and import the environment into Postman.

After proper configuration you may test APIs using Postman UI or just run the command below:

npm run integration-tests

Testing data

To have some initial data for testing as server starts, set an environment variable PERFORM_INITIAL_DATA_IMPORT in .env file to 'true'.

To debug this server in chrome

Install globally:

npm i -g node-inspector

Open chrome and type in:

about:inspect

Then in opened window press on the link:

Open dedicated DevTools for Node

Ensure your localhost:port is in the list for debugging. The default ports for node debugging are 9229 and 9222. You can add yours here. More info you can find here and here.

Now you can start this command in the terminal window:

npm run start:debug

ESLint

ESLint check will run by default by running start:dev or start:debug commands. If there are some troubles with code linting, server will NOT start properly.

CI

ESLint and Postman integration tests are using in Travis CI. See the .travis.yml file.

shop-server's People

Contributors

juli-bk avatar alisa44 avatar

Stargazers

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