This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Dialog from "@material-ui/core/Dialog"; | |
import DialogContent from "@material-ui/core/DialogContent"; | |
import MuiDialogTitle from "@material-ui/core/DialogTitle"; | |
import IconButton from "@material-ui/core/IconButton/IconButton"; | |
import Button from "../Button/Button"; | |
import * as React from "react"; | |
import { ReactNode } from "react"; | |
import CloseIcon from "../icons/CloseIcon"; | |
import ErrorIcon from "../icons/ErrorIcon"; | |
import "./alert.style.scss"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as types from '../actionTypes/constants'; | |
const initialState = { | |
user: {}, | |
trackingCompanies: [], | |
trackingCompaniesInns: [], | |
trackingAddStatus: {}, | |
trackingRemoveStatus: {}, | |
trackingCompaniesDetails: [], | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const path = require('path'); | |
const webpack = require('webpack'); | |
const StatsPlugin = require('stats-webpack-plugin'); | |
const ExtractTextPlugin = require('extract-text-webpack-plugin'); | |
const devServerPort = 3808; | |
const production = process.env.NODE_ENV === 'production'; | |
const root = process.cwd(); | |
if (!production) { | |
// Не должно выполняться при запуске через `docker-compose up --build` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const mongoose = require('mongoose'); | |
const Schema = mongoose.Schema; | |
const UserSchema = new Schema({ | |
name: { | |
type: String, | |
required: true | |
}, | |
email: { | |
type: String, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const JwtStrategy = require("passport-jwt").Strategy; | |
const ExtractJwt = require("passport-jwt").ExtractJwt; | |
const mongoose = require("mongoose"); | |
const User = mongoose.model("users"); | |
const keys = require("../config/keys"); | |
const opts = {}; | |
opts.jwtFromRequest = ExtractJwt.fromAuthHeaderAsBearerToken(); | |
opts.secretOrKey = keys.secretOrKey; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const express = require('express'); | |
const mongoose = require('mongoose'); | |
const bodyParser = require('body-parser'); | |
const passport = require('passport'); | |
const users = require('./routes/api/users'); | |
const app = express(); | |
// Body-Parser |