Glitch is the friendly community where you'll build the app of your dreams

Stuff we're asked a lot

About Glitch

Using Glitch

Glitch Editor

Glitch for Platforms

Don't see your question answered?

 


About Glitch

How much does it cost?

Glitch is free to use. There are some resource restrictions and we expect to charge for premium services or capabilities in the future, but the stuff you can do now will stay free.

Why can I trust building projects on Glitch?

You can get a zip of your code in Glitch, or export it to GitHub and it’ll work without requiring any changes on other services (go to ‘Advanced Options’ from the top-left ‘Project Info’ menu). We’re made by Fog Creek, a profitable business that has been around for over 17 years – so you don’t have to worry about us being some flighty startup.

What inspired Glitch?

HyperCard, Stack Overflow, Neko Atsume, Windows 3.0 Hot Dog Theme, Glitch (the game), Visual Basic, Geocities, "View source", and you!

 

Using Glitch

What technical restrictions are in place?

While we want to keep Glitch as open as possible, there are a few restrictions in place. These are there to help maintain service levels for all, and to stop someone’s accidental infinite loop somehow costing us a small fortune. The restrictions include:

If you get stuck because of these limits, then let us know and we'll try and work something out for you.

What languages and frameworks are supported?

Currently, we only support Node.js. All Node packages should work fine (just require them and include them in your package.json file), see our community projects for some examples. If you encounter any problems please let us know!

What’s "remixing"?

When you remix a project on Glitch, you’re creating a copy of an existing project that you’re then able to edit and make any changes that you want. So for example, we provide a number of community projects that provide examples of doing specific things on Glitch that you can remix to get started with your own web apps quickly.

Note that for security reasons, the .env file and contents of the .data directory aren’t copied when a project is remixed.

Do you have built-in persistence or a database?

We have a persistent file system, so anything you store within your project is kept even after your container sleeps. This means you can use files as a flat file database, save your database files locally, or use third-party storage services like a hosted MongoDB database or Redis. See our storage app collection for examples.

We recommend creating a folder called .data as a safe place to store your data files. This folder isn't copied when a project is remixed.

How do you store secrets/credentials or private data?

.env is a secure environment config section in your projects, useful for storing API keys and app credentials. Only invited collaborators are able to see the contents of your .env file. So anonymous viewers or logged-in users who haven’t been invited to your project can’t see them. When remixing an app the values are cleared so they’re not copied across.

In addition, creating a folder called .data is a safe place to store your data files. This folder isn’t copied across when a project is remixed.

Can I import and export to and from GitHub?

Yep! You can import and export your code to and from GitHub. You can also download your source code as a zip. Both options are available under ‘Advanced Options’ from the top-left ‘Project Info’ menu. Glitch code isn’t special in anyway – it should work without any changes on other services, so you’re not locked in. If you've signed in with Facebook, you'll need to also sign in with GitHub to use these features.

Do you support custom domain names?

Not yet! But it's easy to change your custom subdomain. For now, if you need a custom domain, you can use this workaround to be able to use your own domain name for a Glitch project.

What environment variables are available in a project?

Aside from those you specify yourself in the .env file in your project, the following environment variables are available to all projects:

I'm getting the error 'failed to start application', what's up with that?

Node.js projects on Glitch that need a server require a package.json file with a start command in the scripts field to run. So be sure to include "scripts": { "start": "node server.js" }in package.json (see an example). You can replace `server.js` with the name of your server start file. Shell scripts also work.

Can I change which files cause my app to restart?

Yes, you can add a file called `watch.json` to your app, and the settings it contains will override the default install and restart trigger files and timings. This means that you can specify which files trigger a container restart or install when edited, as well as change the delay time between making edits and those changes being applied. For more information, see watch-json.

Do I need these server-side files?

Maybe not. We support static sites, so if your app or site only contains HTML, JavaScript and CSS, and you don't need any additional packages from npm, then you don’t need them. Feel free to remove any server js files, along with package.json and your site will work without them.

Can I change the version of Node.js my project uses?

Yes, you can do so by updating the engines field specified in the `package.json` project file. For example, the following will make the project use Node v6.9.5: "engines": { "node": "6.9.5" }

You can also use the highest point version by using an x, like so:"engines": { "node": "6.x" }

Glitch user, shindakun, kindly made an app showing all the Node versions available on Glitch.

OMG, the whole world can see my project's code! Can I make it private?

You can! Like GitHub, projects on Glitch are public by default. However, you can make your project's code private by opening the 'Share' menu and then selecting 'Make Private'. Regardless of whether your project is public or private though, we provide ways  to hide sensitive information like passwords and data.

 

Glitch Editor

Can I turn off auto-refreshing the app preview when I make changes?

Yes, in the editor, uncheck the 'refresh app on changes' option from the top-right user options menu. Your app preview will no longer reload in the browser when you make code changes.

I've got mad skillz, I need a terminal/command line/console

We got you! There's a console that you can use to interact with the underlying project container. You can load it by clicking on 'Open Console' under 'Advanced Options', from the top-left Project Info menu in the editor.

Files I created via the console aren't appearing in the editor. Why!?

For now, the console and the editor don't automatically sync. You can manually run the `refresh` command from the console and it will force a refresh, updating the editor with any console-created files.

Aww, don't make me scroll horizontally! Can't the code just wrap?

It can! Check the 'wrap text' option from the top-right user options menu in the editor.

Is there a dark theme?

Yep! Save your little peepers and toggle between dark and light editor themes from the top-right user options menu in the editor.

 

Glitch for Platforms

How do I add a Remix button to my docs?

Users can remix any public app on Glitch, but you might want to encourage your users to remix an app from your own website, blog post or GitHub page. To create your button use our handy generator.

How do I add a GitHub import button to my readme?

Users can import any public app on GitHub into Glitch. To make it easy for them to do so, you can add a link on your GitHub page that will import the repo you specify to Glitch, no account required. To create your button use this little generator.

How do I embed the Glitch button in my project?

If you want to encourage others to remix and learn more about your apps, we've built a widget that you can include in your projects to generate a neat little button. To use it, you just need to copy and paste a short code snippet into your project.

 

Something else?

Don't see your question answered?

Ask it on the forum or drop us an email.

Of course, this site was made on Glitch too