Skip to content

Instantly share code, notes, and snippets.

@jerriclynsjohn
Created September 8, 2021 15:20

Revisions

  1. jerriclynsjohn created this gist Sep 8, 2021.
    21 changes: 21 additions & 0 deletions netlify.toml
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,21 @@
    # example netlify.toml
    [build]
    command = "npm run build"
    functions = "functions"
    publish = "public"

    ## Uncomment to use this redirect for Single Page Applications like create-react-app.
    ## Not needed for static site generators.
    [[redirects]]
    from = "/*"
    to = "/index.html"
    status = 200

    ## (optional) Settings for Netlify Dev
    ## https://github.com/netlify/cli/blob/master/docs/netlify-dev.md#project-detection
    [dev]
    command = "yarn start" # Command to start your dev server
    port = 3000 # Port that the dev server will be listening on
    publish = "dist" # Folder with the static content for _redirect file

    ## more info on configuring this file: https://www.netlify.com/docs/netlify-toml-reference/