Git Product home page Git Product logo

nodejs-be-starter's Introduction

Backend Boiler Plate Created with Nodejs Version 2.0.1

Stack :

  • Nodejs
  • Mqtt
  • Redis
  • Mysql
  1. body-parser: You will use this dependency to convert the body of incoming requests into JavaScript objects.
  2. cors: You will use this dependency to configure Express to add headers stating that your API accepts requests coming from other origins. This is known as Cross-Origin Resource Sharing (CORS).
  3. express: This is the Express library itself.
  4. helmet: This library helps to secure Express APIs by defining various HTTP headers.
  5. morgan: This library adds some logging capabilities to your Express API.

Response format Success

"code": 200, "success": true, # true/false "message": "Invalid email or password", "data": {}

"code": 404, "success": false, # true/false "message": "Invalid email or password", "data": {}

================= errors: # 10XX : Main App Errors '1000': 'App Server Error, please contact the admin' # Global Error '1001': 'Missing Headers' '1002': 'Missing Parameters' '1003': 'Invalid offset or limit' '1004': 'Invalid Locale' '1005': 'Invalid Timezone' '1006': 'You exceeded the limit of requests per minute, Please try again after sometime.'

11XX : Http Errors

'1101': 'Unauthorized'
'1102': 'Not authorized to access'
'1103': 'Unprocessable Entity'
'1104': 'Authentication Failed'
'1105': 'Not Found'

12XX : Auth Erorrs

'1201': 'Your session is expired, please login again' # Token expired
'1202': 'Your sessions is invalid' # JWT verification error
'1203': 'Your sessions is invalid' # Error encountered while decoding JWT token
'1204': 'Your sessions token is invalid' # Invalid token
'1205': 'You are Unauthorized, Please login' # You are Unauthorized, Please login
'1206': 'Authentication Error, User Not found' # Authentication Error, User Not found

13XX Session Errors

'1301': 'Invalid Credentials'
'1302': 'Invalid Login Type'
'1303': 'Invalid Social Type'
'1304': 'Login Error'
'1305': 'You Account is disabled by the admin.'
'1306': 'Invalid mobile number.'
'1307': 'Wrong confirmation code! Try again.'
'1308': 'Invalid email or password'
'1309': 'Your account already exist in the app, please try to login.'
'1310': 'Your request is invalid or your request time is over, please try again.'
'1311': 'You are not authorized to access this app'
'1312': 'An issue in the Active Directory Service, please contat the Administrator'
'1313': 'your email still not confirmed, please confirm your email'
'1314': 'Email link has been expired'
'1315': 'Your account is not activated Please verify your email to activate the account'
'1316': 'You cannot delete user until his requests been completed or cancelled'
'1317': 'This number has already registered'
'1318': 'Please before you login with google account first sign up'
'1319': 'Your old mobile number is wrong'
'1320': 'confirmation code is expired! Try again'
'1321': 'You cannot delete provider until he completed or cancelled his requests'
'1322': 'Your account was blocked by Admin. Please contact admin at [email protected]'

data_found: 'Data found' no_data_found: 'No data found' not_found: 'Not found' x_not_found: '%{name} not found!' update_successfully: 'Updated successfully' x_update_successfully: '%{name} updated successfully' created_successfully: 'Created successfully' x_created_successfully: '%{name} created successfully' deleted_successfully: 'Deleted successfully' x_deleted_successfully: '%{name} deleted successfully' request_submitted: 'Order %{code} Code has been Submitted successfully' orders_not_found: 'No orders yet'

nodejs-be-starter's People

Contributors

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