资源算法magenta-backend

magenta-backend

2020-04-13 | |  74 |   0 |   0

Magenta Backend

This is the backend repository for magenta social media network

Getting Started

Install the dependencies

$ npm install

Create a .env file

$ cp .env.example .env

Set your .env file and set your secret keys

JWT_SECRET_KEY=Your_Secret_Key
SESSION_SECRET_KEY=Your_Secret_Key

To start the app

$ npm run start:dev

Lint the project

$ npm run lint# fix$ npm run lint:fix

Code Style

This project code style uses Eslint + Airbnb + Prettier configuration

// .eslintrc.jsmodule.exports = {
  extends: ['airbnb-base', 'plugin:prettier/recommended'],
  plugins: ['prettier'],

Eslint rules

// .eslintrc.jsrules: {    'prefer-promise-reject-errors': 'off',    'no-underscore-dangle': 'off',    'func-names': 'off',    'no-console': 'off',    'import/no-dynamic-require': 'off',
  },

Prettier Configurations

// .prettierrc{  "tabWidth": 2,  "useTabs": false,  "singleQuote": true}

Module Aliases

This project implements module aliases using the module-alias package to ease the usage of imports/requires

Existing aliases:

// package.json"_moduleAliases": {    "@app": "./",    "@config": "./config",    "@middlewares": "./middlewares",    "@models": "./models",    "@httpd": "./httpd",    "@services": "./services",    "@validation": "./validation"
  },

e.g

require('module-alias/register');const config = require('@config/express');

Packages And Tools


上一篇:Magenta-Telegram

下一篇:fuchsia-magenta

用户评价
全部评价

热门资源

  • seetafaceJNI

    项目介绍 基于中科院seetaface2进行封装的JAVA...

  • spark-corenlp

    This package wraps Stanford CoreNLP annotators ...

  • Keras-ResNeXt

    Keras ResNeXt Implementation of ResNeXt models...

  • capsnet-with-caps...

    CapsNet with capsule-wise convolution Project ...

  • inferno-boilerplate

    This is a very basic boilerplate example for pe...