-
Notifications
You must be signed in to change notification settings - Fork 0
/
netlify.toml
42 lines (36 loc) · 1.44 KB
/
netlify.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
[build]
# Directory (relative to root of your repo) that contains the deploy-ready
# HTML files and assets generated by the build. If a base directory has
# been specified, include it in the publish directory path.
publish = "build"
# Default build command.
command = "npm run build"
# Directory with the serverless Lambda functions to deploy to AWS.
functions = "src/functions/"
[dev]
framework = "#custom"
command = "npm run start" # Command to start your dev server
targetPort = 8080 # The port for your application server, framework or site generator.
port = 8888 # The port that the netlify dev will be accessible on
publish = "public" # If you use a _redirect file, provide the path to your static content folder
# Define redirects from custom endpoint to a netlify function
[[redirects]]
from = '/api/weather/*'
to = '/.netlify/functions/open-weather/:splat'
query = { lat = ':lat', lon = ':lon', units = ':units' }
status = 200
force = true
# Define redirects from custom endpoint to a netlify function
[[redirects]]
from = '/api/geocode/forward/*'
to = '/.netlify/functions/location-iq/:splat'
query = { city = ':city', type = ':type' }
status = 200
force = true
# Define redirects from custom endpoint to a netlify function
[[redirects]]
from = '/api/geocode/reverse/*'
to = '/.netlify/functions/location-iq/:splat'
query = { lat = ':lat', lon = ':lon', type = ':type' }
status = 200
force = true