Flitter runs on Node.js and is developed over on my Git server. Flitter and its sub-components developed by Garrett Mills are licensed under the highly permissive MIT License. In not so many words, this means that you can do basically whatever you want with the Flitter code as long as you absolve me from liability and warranty. Check out the full license here though. The master branch always contains a working version of Flitter, so getting started is as easy as cloning the main Flitter repository, installing the Node.js packages, and copying over the default configuration.
0. System Requirements
Flitter requires:
- Node.js v12 or later. The LTS version works fine. Get it here.
- You need
gcc
and standardbuild-tools
to compile thebcrypt
dependency. For macOS that means Xcode. For Linux, installbuild-tools
. For Windows, install Node.js with the Chocolatey build tools option.
- You need
- The Yarn package manager. Available here. (Yarn 2 support coming soon!)
- A MongoDB database instance. You can install it locally like this.
1. Clone the Repository
First, pull down a copy of Flitter into a new folder for your project. You can download a zip of the repository here, but the easiest way is to use Git:
git clone https://git.garrettmills.dev/flitter/flitter my_app
This will create a new directory called my_app
and download Flitter into it.
2. Install the Packages
Flitter relies on a few awesome Node.js packages to run. These can be installed using some flavor of Node.js package manager, which are available on basically every platform. Flitter recommends Yarn as a good option here. In fact, Flitter's creator uses Yarn, so a stable yarn.lock
file is included with Flitter. Install the packages by running the following command from inside the project folder:
yarn install
Note that you need the gcc
equivalent build toolchain for your platform to compile Flitter's bcrypt
dependency.
3. Copy the Default Config
Flitter uses .env
based environment configuration, which we'll cover more in-depth later, but for now, just copy over the included example configuration:
cp example.env .env
In here, you can modify the standard variables to suit your environment. If you're using a MongoDB server not hosted locally, you'll probably want to change:
DATABASE_AUTH=true
DATABASE_HOST=some.host.url
DATABASE_USERNAME=awesome_user
DATABASE_PASSWORD="my~5uper_secur3-pa$$word"
4. Start Flitter!
That's all it takes to get Flitter ready to run. To start the Flitter server, run the index.js
file:
node index.js
That should start Flitter running on port 8000
by default.
Next: Configuration