Skip to content

Instantly share code, notes, and snippets.

View Rowadz's full-sized avatar
🤙
🦖🦖

Mohammad Alrawad Rowadz

🤙
🦖🦖
View GitHub Profile
<!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>
<!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 ">
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: {
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
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,
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
}
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
}
}, {
/* 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
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}`)