|
| 1 | +# Learn Faust.js |
| 2 | + |
| 3 | +Next.js app to be used with the [Learn Faust tutorial](https://faustjs.org/docs/tutorial/learn-faust/). |
| 4 | + |
| 5 | +## Quick Start |
| 6 | + |
| 7 | +1. **Install dependencies** |
| 8 | + ```bash |
| 9 | + npm install |
| 10 | + ``` |
| 11 | + |
| 12 | +2. **Start everything** |
| 13 | + ```bash |
| 14 | + npm run dev |
| 15 | + ``` |
| 16 | + |
| 17 | +That's it! The first time you run `npm run dev`, it will automatically: |
| 18 | +- Create your `.env.local` configuration file |
| 19 | +- Start WordPress with Docker |
| 20 | +- Import the pre-configured database |
| 21 | +- Start the Next.js development server |
| 22 | + |
| 23 | +## Access Points |
| 24 | + |
| 25 | +- **Frontend**: [http://localhost:3000/](http://localhost:3000/) |
| 26 | +- **WordPress Admin**: [http://localhost:8888/wp-admin/](http://localhost:8888/wp-admin/) |
| 27 | + - Username: `admin` |
| 28 | + - Password: `password` |
| 29 | + |
| 30 | +## What's Pre-configured? |
| 31 | + |
| 32 | +The tutorial environment comes with: |
| 33 | +- ✅ WPGraphQL plugin (active) |
| 34 | +- ✅ FaustWP plugin (active) |
| 35 | +- ✅ GraphQL introspection enabled |
| 36 | +- ✅ Permalink structure: `/blog/%postname%/` |
| 37 | +- ✅ Faust secret key configured |
| 38 | +- ✅ Demo content ("Hello world!" post, "Sample Page") |
| 39 | + |
| 40 | +## Available Commands |
| 41 | + |
| 42 | +| Command | Description | |
| 43 | +| --------------- | -------------------------------------------------------------- | |
| 44 | +| `dev` | Start everything (WordPress + Next.js) | |
| 45 | +| `dev:next` | Run Next.js development server only | |
| 46 | +| `build` | Build the Next.js application for production | |
| 47 | +| `wp:start` | Start the WordPress environment | |
| 48 | +| `wp:stop` | Stop the WordPress environment | |
| 49 | +| `wp:destroy` | Completely remove the WordPress environment | |
| 50 | +| `wp:db:export` | Export the WordPress database | |
| 51 | +| `wp:db:import` | Import the WordPress database | |
| 52 | + |
| 53 | +## Prerequisites |
| 54 | + |
| 55 | +- Node.js (v18+ recommended) |
| 56 | +- [Docker](https://www.docker.com/) (required for WordPress with wp-env) |
| 57 | + |
| 58 | +Make sure Docker is running before starting (`docker ps`) |
| 59 | + |
| 60 | +## Learn More |
| 61 | + |
| 62 | +For detailed step-by-step instructions on using Faust.js features, visit the [Learn Faust tutorial](https://faustjs.org/docs/tutorial/learn-faust/). |
0 commit comments