You can find the source code on github: https://github.com/squidex/squidex
To work with the source code you need the following tools:
- Visual Studio Code or Visual Studio 2017
- Node.js
- .NET Core SDK (Already part of Visual Studio 2017)
- MongoDB
- Optionally: Redis
- Optionally: RabbitMQ
We also provide ready to use docker configurations: https://github.com/squidex/squidex-docker. Just execute the following commands to get a mongodb and redis installation for development:
git clone https://github.com/squidex/squidex-dockercd squidex-docker/dependenciesdocker-compose up -d
Please Note: MongoDB and Redis are not password protected. Do not expose it to the internet.
The management portal is written with Angular and Webpack2. Therefore you have to run the webpack web dev server which automatically detects changes and builds the application, whenever a file is changed. The typescript code and sass files will be compiled.
The website itself is written in ASP.NET Core. For the frontend it just provides a single html file which links to the files from the webpack dev server.
cd src/Squidex/Squidex(Go to the web application project)npm i(Install all dependencies for the frontend)npm rebuild node-sass --forcenpm run dev(Runs the webpack vdev server)- Optionally:
npm test(Runs the unit tests and listens for changes) - Optionally:
npm run test:coverage(Runs the unit tests and calculates the test coverage).
cd src/Squidex/Squidex(Go to the web application project)dotnet restore(Install all dependencies)dotnet run(Run the API)
Open
http://localhost:5000to run Squidex.
You have to run both indendently. The first time it feels redundant and annoying and we also had some code to run the webpack dev server automatically when the application is started. But you will recognize that it takes a minute for the webpack dev server to start. Therefore we decoupled the commands, so that you can keep the webpack dev server running, even when you have to restart the dotnet application.
As the name 'webpack dev server' indicates, it is only used for development. For production we bundle all typescript files, html and sass and add the bundle to the deployment package.