Update the getting started guide
The getting started guide starts by assuming you have installed all the dependencies and created a config file.
There should be a section that proceeds this which details installation that can be followed by users who are not familiar with Node.js
Steps to cover
- Installing Node.js (Windows, Mac, Linux)
- Initiating a new project (
npm init) - Ensuring a project is setup to use ES modules – is there a flag that enables this by default? (See https://github.com/getindiekit/indiekit/issues/382)
Hi @paulrobertlloyd, I have just had a quick look at the set up instructions for other node projects (Ghost CMS etc).
I agree with your steps listed, although:
- I assume that only Node 14 is supported,
- I cannot find a flag for npm init that will include ES modules.
- Are you OK for me to submit a pull request for the documentation update?
Tangentially, I assume that the steps listed above, followed by npm install @indiekit/indiekit pulls from the npm registry. Is there any instance where it would be better to clone the git repository and build indiekit locally?
In answer to your questions:
-
Firstly, always happy to receive pull requests. Just note that I have started updating the documentation site this weekend, so let me know if its more helpful.
-
I’ve actually found out how to create an
npm initscript that would massively help with on-boarding. This means you could do something like the following:npm install @indiekit/indiekit npm init indiekitThis would then prompt a number of questions, before generating a configuration file and install any required plug-in dependencies. This’ll require a bit of work to figure out, but I think it would really help towards the goal of making the project more accessible and easier to set up.
-
It should work with Node v14, but I have set the minimum version requirement to v16 (this is the current stable release).
-
I created this template repo: https://github.com/getindiekit/example-config – would this help?
With incoming authentication endpoint, there’s likely a number of steps needed to get started:
- Walk through creating a configuration file with
npm create indiekit [directory] - Push
[directory]to a host (with separate documentation for how to do this with popular hosts) - Add environment variables:
-
SECRETused to generate secret values - Any variables needed by plugins, such as API keys and secrets
-
- Visit
/auth/new-passwordto generate a password secret - Use this value for
PASSWORD_SECRETenvironment variable - Optionally (but recommended) create a MongoDB database, and add it’s URL to
MONGO_URL - Add endpoint links to your website
<head>.
Some hosts offer CLIs, which could make parts of this process easier, such as adding and updating environment variables and creating a Mongo database. Doesn’t feel great, but probably a good place to start for 1.0.