Skip to content

Instantly share code, notes, and snippets.

View lakshaygupta21's full-sized avatar
🎯
Focusing

Lakshay Gupta lakshaygupta21

🎯
Focusing
  • Bathinda, Punjab, India
View GitHub Profile
const mongoose = require("mongoose");
const TrainingSchema = new mongoose.Schema({
input: [Number, Number, Number],
output: [Number]
});
module.exports = Train = mongoose.model("trainingdatas", TrainingSchema);
OAUTH_TOKEN=/*copy/paste the CONTENTS OF YOUTUBE-NODEJS-QUICKSTART.JSON FILE as it is in json format*/
CLIENT_SECRET=/*copy/paste the CONTENTS OF CLIENT_SECRET.JSON FILE as it is in json format*/
VIDEO_ID=your video Id
let cron = require('node-cron')
let shell = require('shelljs')
var express = require('express')
var app = express()
app.get('/', function(req, res) {
res.redirect("https://www.youtube.com/watch?v=wYOA4waoWog")
})
cron.schedule("8 17,25,34,42,51,59 * * * *", function() {
require('dotenv').config()
var {
google
} = require('googleapis');
var OAuth2 = google.auth.OAuth2;
const VIDEO_ID = process.env.VIDEO_ID
//main()
async function main() {
const express = require("express");
const router = express.Router();
var Fruits = require('../../model/fruits.js')
/**
* @swagger
* /api/fruits:
* get:
* tags:
* - Fruits
/**
* @swagger
* /api/fruits:
* get:
* tags:
* - Fruits
* description: Returns all fruits
* produces:
* - application/json
* responses:
const swaggerOptions = {
swaggerDefinition: {
info: {
title: "Documenting REST API's",
description: "This is an implementation of how to document your RESTful API's using SWAGGER",
servers: ['http://localhost:3000']
},
"components": {
"schemas": {
"fruits": {
require('./config/config')
const express = require('express')
const mongoose = require('mongoose');
mongoose.set('useFindAndModify', false);
const app = express()
const bodyParser = require('body-parser')
const swaggerJsonDoc = require('swagger-jsdoc')
const swaggerUI = require('swagger-ui-express')
const mongoose = require("mongoose");
const fruitsSchema = new mongoose.Schema({
name: {
type: String
}
});
module.exports = fruits = mongoose.model("fruits", fruitsSchema)
<html>
<head>
<title>Reports</title>
<!-- jQuery -->
https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js
<!-- Bootstrap -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js
<!-- Datepicker -->
<link href='bootstrap-datepicker/dist/css/bootstrap-datepicker.min.css' rel='stylesheet' type='text/css'>