This file contains 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>SignUp</title> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.100.2/css/materialize.min.css"> | |
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"> | |
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/aos/2.2.0/aos.css"> | |
<link rel="stylesheet" type="text/css" href="css/signup.css"> | |
</head> |
This file contains 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Login</title> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.100.2/css/materialize.min.css"> | |
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"> | |
<link rel="stylesheet" type="text/css" href="css/login.css"> | |
</head> | |
<body class="grey darken-4 white-text flow-text "> |
This file contains 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 Sequelize = require('sequelize'); | |
const DataTypes = Sequelize.DataTypes; | |
module.exports = function (app) { | |
const sequelizeClient = app.get('sequelizeClient'); | |
const uploads = sequelizeClient.define('uploads', { | |
description: { | |
type: DataTypes.TEXT, | |
allowNull: false | |
}, | |
orignalName: { |
This file contains 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 createService = require('feathers-sequelize'); | |
const createModel = require('../../models/uploads.model'); | |
const hooks = require('./uploads.hooks'); | |
const multer = require('multer'); | |
const { | |
authenticate | |
} = require('@feathersjs/authentication').express; // getting feathers' authenticate middleware | |
const storage = multer.diskStorage({ | |
destination: (_req, _file, cb) => cb(null, 'public/uploads'), // where the files are being stored | |
filename: (_req, file, cb) => cb(null, `${Date.now()}-${file.originalname}`) // getting the file name |
This file contains 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 Sequelize = require('sequelize'); | |
const DataTypes = Sequelize.DataTypes; | |
module.exports = function (app) { | |
const sequelizeClient = app.get('sequelizeClient'); | |
const users = sequelizeClient.define('users', { | |
email: { | |
type: DataTypes.STRING, | |
allowNull: false, |
This file contains 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 Sequelize = require('sequelize'); | |
const DataTypes = Sequelize.DataTypes; | |
module.exports = function (app) { | |
const sequelizeClient = app.get('sequelizeClient'); | |
const posts = sequelizeClient.define('posts', { | |
text: { | |
type: DataTypes.STRING, | |
allowNull: false | |
} |
This file contains 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 Sequelize = require('sequelize'); | |
const DataTypes = Sequelize.DataTypes; | |
module.exports = function (app) { | |
const sequelizeClient = app.get('sequelizeClient'); | |
const comments = sequelizeClient.define('comments', { | |
text: { | |
type: DataTypes.STRING, | |
allowNull: false | |
} | |
}, { |
This file contains 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
/* eslint-disable no-console */ | |
const faker = require('faker'); | |
const fs = require('fs'); | |
/** | |
* | |
* I want to add 30 records for each table we | |
* have with a recpect to the relations. | |
* and store the users in a json file to | |
* be able to login with them |
This file contains 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 myUpload = require('./my-upload'); | |
const { | |
authenticate | |
} = require('@feathersjs/authentication').express; | |
const multer = require('multer'); | |
const storage = multer.diskStorage({ | |
destination: (req, file, cb) => cb(null, 'public/uploads'), | |
filename: (req, file, cb) => cb(null, `${Date.now()}-${file.originalname}`) |
OlderNewer