-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path_notes.txt
43 lines (39 loc) · 2.1 KB
/
_notes.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
generated via NUXT in: 03/11/2018 ,type=universal app ; using: express,bootstrap,axios,eslint,prettier,webpack,git,nodemon,
-> nuxt scaffolded project
==================
remove a file from previous history:
git filter-branch -f --index-filter 'git rm --cached -f -q --ignore-unmatch "$file"' --prune-empty --tag-name-filter cat -- --all
->$file = file path (related to the root folder)
then force push:
git push origin master --force
==================
eldeeb/samples/ contain useful samples (ex: models,data,pages,...)
==================
/db/
__db/step0/ : the original data (.json) from the old project (sqlite & php)
schema
- $collection.js: schema for the original colletion (contains the original data)
- tmp.$collection.js : temporary collections contains the final cached data (tmp collection use the same indexes of the original collection), use mongoDB.aggregate.$out
- $db.$collection.js : collection in $db database
examples
$data.js => get data from the database
$data_save.js => send data to db
$data_update -> update the corresponding tmp collection
index.js => connect to the database and returns eldeeb.promise
add modifiedAt=true to every schema object (if not added will create modifiedAt as a string not date object)
==================
examples (nuxt):
https://nuxtjs.org/examples
https://github.com/jweboy/node-express-nuxt-mongodb-boilerplate
==
nuxt-edge is the beta version of nuxt https://medium.com/nuxt/nuxt-2-is-coming-oh-yeah-212c1a9e1a67
==================
[11.12.2018] using commonJs:require & module.exports causes some problems (so we switched to ES6:import & export):
- eldeeb/lib/index.js->isArray->obj[Symbol.iterator] exits the code without any error,
- pages/test.vue : test=require('../test.js')
test.js : require('./eldeeb/..')/*contains 'Symbol.iterator'*/ module.exports="OK"
using module.exports: test={}
using import & export: test=OK
- ES6 is the standard spec of js, so we will use it (i.e: import & export)
- currently node.js supports ES6 module system in expremental mode only, Nuxt uses babel transpiler to convert them to commonJS module system
==================