Installation tips for FireDocs easy setup
If you don't see the features of FireDocs, you can see it here in Firedocs Features.
1. Download
Firedocs uses a classical Firebase structure
5. Test
You can test the site before deploy using the console (or terminal), accessing in the FireDocs/ root and run:
6. Deploy to Firebase
In the console (or terminal) access in the FireDocs root and run:
Merge with your current Firebase project if you already have one.
- Download or clone the project FireDocs from Github.
- Create a Firebase project if you don't have one yet
- Install Node.js, NPM and the Firebase CLI
Firedocs uses a classical Firebase structure
- functions/
Here is the FireDocs server-side. Uses Firebase Functions (NodeJS like) to render in server the articles. Here you can edit some constants and url paths.
Important: in this path run npm install --save in the console (or terminal) to download the project dependences from package.json - functions/view html files for render
- public/ The public directory to serve in Firebase Hosting
- public/css files to customize the styles
- firebase.json
Firebase Hosting configuration, cache expires for static files, and rewrites for FireDocs functions. Find and replace <HELP_URL> by your path e.g: https://mysite.com/helpdesk - admin/
Here is the documentation admin interface in admin/firedocs.html. Includes Firebase Authentication so run it on localhost in the path 'FireDocs/' of the project. I use php -S 0.0.0.0:8888 in the console (or terminal) but you can use any tool that provide a localhost view. If you want to upload the admin to your domain, don't forget improve the security in the login.
Edit the file admin/firedocs.js with your custom variables. - firestore-rules.txt
Here the Firestore Rules template to copy-paste in Firebase console (modify your variables). Find the <ADMIN_UID> in the users section of your project's console - storage-rules.txt
Here the Storage Rules template to copy-paste in Firebase console (modify your variables). Find the <ADMIN_UID> in the users section of your project's console
Inside of functions/ folder run in the console (terminal)
npm install --save
in order to install the project dependencies
4. Add Firebase rules
Open the console of your firebase project console and edit:
4. Add Firebase rules
Open the console of your firebase project console and edit:
- Storage: open Firebase Storage Rules, copy-paste and edit the file /storage-rules.txt
- Firestore: open Firebase Firestore Rules, copy-paste and edit the file /firestore-rules.txt
Note: You can find the admin user's UID in the Authentication section of Firebase console (after admin logs in for the first time)
5. Test
You can test the site before deploy using the console (or terminal), accessing in the FireDocs/ root and run:
firebase serve --only functions,hosting --project <your_project_id>Note: Firebase local server uses your browser cache for statics files, so keep your JavaScript console open un your browser and enable the option "disable cache" to see your changes.
6. Deploy to Firebase
In the console (or terminal) access in the FireDocs root and run:
firebase deploy --only functions,hosting --project <your_project_id>
Merge with your current Firebase project if you already have one.
No hay comentarios.:
Publicar un comentario
Deja tu comentario aqui...