Use the templateCreate a new project based on the template using degit:
npx degit junglejs/template jungle-app cd jungle-appInstall the dependencies...
npm install...then start the build/run
npm run startNavigate to localhost:3000. You should see your app running.
Right now this command just builds an output to jungle/build and serves it locally. This jungle/build folder can be deployed immediately, but as of right now livereload doesn't work, so to reload simply stop the current process and rerun it.
These are the important files and folders to work with in every Jungle app.
- /jungle.config.js - This is your configuration file for Jungle, the most important part of which is dataSources, where data sources for the GraphQL data layer are specified. The template includes two helpful examples of data.
- /jungle/build/ - This is the build output from running your Jungle app, and is the directory which should be deployed to hosting.
- /static - This holds all of your static files, and the contents of which will be inserted into the /jungle/build/ directory to be used by the rest of your app.
- /src/routes/ - This holds all of the routes which will be turned into static pages. Routes can be nested within folders, use multiword or singleword names, or even use a route variable as shown in the /blog/[slug].svelte route file. A route named Index.svelte will act as the route for the name of the folder it resides in.
- /src/components/ - This holds all of the components to be used in multiple routes within your app. These components can access the GraphQL layer just like the routes can.