0. Create a new PubSweet app
To start, you'll need to create a new PubSweet app to work in. First, make sure PubSweet is properly installed. Then, follow these steps:
pubsweet new [your_app_name]to generate a new app
cdinto the newly created
pubsweet startto start a PubSweet server and a PostgreSQL database instance
- In your browser, navigate to
localhost:3000. If everything is working correctly, the PubSweet app will load
- Verify that you can login by going to
localhost:3000/loginand entering your credentials
For this tutorial, you'll want to run PubSweet in dev mode:
pubsweet setupdbin the app's root directory to create the dev database
pubsweet startstarts a server running in dev mode
Dev mode allows changes to the code to be hot loaded into the app without having to restart the server. It also enables logs state and action changes to the console for easy debugging. You can see these changes and console logs by opening your browser's developer tools and finding the console. You'll also want to use your favorite text editor for updating code.
If you've got a running PubSweet, then you're ready to make a component.