Docs
FireSnippets
FireSnippetsGetting Started | Fire Snippets Docs

Getting Started

Learn how to install FireSnippets using CDN or NPM.

Using CDN (Pure JavaScript)

To include FireSnippets in your pure JavaScript project, add the following <script> tags to your HTML file:

<!-- Include Firebase CDN -->
<script src="https://www.gstatic.com/firebasejs/9.0.0/firebase-app.js"></script>
<script src="https://www.gstatic.com/firebasejs/9.0.0/firebase-auth.js"></script>
<script src="https://www.gstatic.com/firebasejs/9.0.0/firebase-firestore.js"></script>
 
<!-- Include FireSnippets CDN -->
<script src="https://cdn.firesnippets.com/fire-snippets.js"></script>

Note: Make sure to include the Firebase scripts before including FireSnippets.

Using NPM (React/Next.js)

Install FireSnippets via NPM:

npm install fire-snippets

Import FireSnippets and Firebase services in your JavaScript files:

// Import Firebase modules
import firebase from 'firebase/app';
import 'firebase/auth';
import 'firebase/firestore';
 
// Import FireSnippets
import FireSnippets from 'fire-snippets';

Was this helpful?
Docs
Copyright © Fire Snippets. All rights reserved.