Let's assume we want to deploy our app to http://example.com/projects/laravel-vue-demo/. Here's what you will need to do:
- Add the next keys to your
.envconfig:
APP_PUBLIC_PATH=
VUE_PUBLIC_PATH=/
| // | |
| // See: https://kentcdodds.com/blog/profile-a-react-app-for-performance#build-and-measure-the-production-app | |
| // See: https://nextjs.org/docs/api-reference/next.config.js/custom-webpack-config | |
| const TerserPlugin = require('next/dist/compiled/terser-webpack-plugin'); | |
| module.exports = { | |
| webpack: (config, options) => { | |
| // | |
| // Use profiler-enabled React builds |
Let's assume we want to deploy our app to http://example.com/projects/laravel-vue-demo/. Here's what you will need to do:
.env config:APP_PUBLIC_PATH=
VUE_PUBLIC_PATH=/
| const otpGenerator = require("otp-generator"); | |
| const crypto = require("crypto"); | |
| const key = "verysecretkey"; // Key for cryptograpy. Keep it secret | |
| function createNewOTP(phone){ | |
| // Generate a 6 digit numeric OTP | |
| const otp = otpGenerator.generate(6, {alphabets: false, upperCase: false, specialChars: false}); | |
| const ttl = 5 * 60 * 1000; //5 Minutes in miliseconds | |
| const expires = Date.now() + ttl; //timestamp to 5 minutes in the future | |
| const data = `${phone}.${otp}.${expires}`; // phone.otp.expiry_timestamp |
| <template> | |
| <div> | |
| <div | |
| v-for="(item, i ) in items" | |
| :key="i" | |
| :class="{ active: i === activeItem}" | |
| > | |
| // some looped items from data here | |
| // button for active toggle | |
| <button @click="selectItem(i)"> make item active </button> |
| #!/bin/sh | |
| git log --shortstat | grep -E "(Author: )(\b\s*([A-Z]\w+)){2}|fil(e|es) changed" | awk ' | |
| { | |
| if($1 ~ /Author/) { | |
| author = $2" "$3 | |
| } else { | |
| files[author]+=$1 | |
| inserted[author]+=$4 | |
| deleted[author]+=$6 | |
| } |
| FROM adminer:4.7.1 | |
| # WATCH OUT WHEN UPGRADING, THE SED BELOW MIGHT STOP WORKING | |
| MAINTAINER marek@cilf.cz | |
| USER root | |
| RUN apk add autoconf gcc g++ make libffi-dev openssl-dev | |
| RUN pecl install mongodb | |
| RUN echo "extension=mongodb.so" > /usr/local/etc/php/conf.d/docker-php-ext-mongodb.ini |
| <template> | |
| <div> | |
| <vue-editor v-model="content" ref="editor" :editor-options="toolbarOptions" @text-change="updateValue" useCustomImageHandler @imageAdded="uploadImage"></vue-editor> | |
| </div> | |
| </template> | |
| <script> | |
| import Vue from "vue"; | |
| import axios from 'axios' | |
| let VueEditor, Quill; |
| var months_th = [ "มกราคม", "กุมภาพันธ์", "มีนาคม", "เมษายน", "พฤษภาคม", "มิถุนายน", "กรกฎาคม", "สิงหาคม", "กันยายน", "ตุลาคม", "พฤศจิกายน", "ธันวาคม", ]; | |
| var months_th_mini = [ "ม.ค.", "ก.พ.", "มี.ค.", "เม.ย.", "พ.ค.", "มิ.ย.", "ก.ค.", "ส.ค.", "ก.ย.", "ต.ค.", "พ.ย.", "ธ.ค.", ]; | |
| // done |