Skip to content

Commit

Permalink
Updates dev env setup
Browse files Browse the repository at this point in the history
  • Loading branch information
David authored and David committed Apr 17, 2024
1 parent 58118b0 commit dee9f07
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 7 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,14 @@ The internet <> NGINX (reverse proxy) <> Blot (express.js node application) <> R

## Development setup

Clone this repository:
First, clone this repository:

```
git clone https://github.com/davidmerfield/blot
```

Then install [node version 16](https://nodejs.org/en/download/package-manager).

Blot requires a number of different hosts to work (one for the dashboard, one for the CDN and many for your sites). In order to get this working in a local development environment, I recommend using [dnsmasq](https://wiki.archlinux.org/index.php/dnsmasq) to resolve everthing under the non-existent `.blot` TLD to the local machine:

```
Expand Down
8 changes: 7 additions & 1 deletion app/documentation/featured/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,13 @@
const fs = require("fs-extra");

module.exports = async function (req, res, next) {
res.locals.featured = await fs.readJSON(__dirname + "/data/featured.json");

try {
res.locals.featured = await fs.readJSON(__dirname + "/data/featured.json");
} catch (e) {
console.error(e);
res.locals.featured = { sites: [] };
}

res.locals.featured.sites = res.locals.featured.sites.map(i => {
return {
Expand Down
2 changes: 1 addition & 1 deletion app/documentation/templates.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const templates = fs
async i =>
new Promise((resolve, reject) => {
getTemplate(i)
.catch(reject)
.catch(() => resolve())
.then(template => {
if (!template) return resolve();
const demo_folder = template.locals.demo_folder;
Expand Down
4 changes: 1 addition & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
version: '3.8'

services:
node-app:
image: blot
Expand Down Expand Up @@ -37,7 +35,7 @@ services:
- ./tests:/usr/src/app/tests
- ./notes:/usr/src/app/notes
- ./config:/usr/src/app/config
command: npx nodemon /usr/src/app/data/app.js --watch /usr/src/app/data/app.js
command: npx nodemon /usr/src/app/app/local.js --watch /usr/src/app/app/documentation -e js,html,css --ignore "**/data/*"

redis:
image: "redis:alpine"
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"scripts": {
"test": "node tests",
"start": "node app",
"dev": "CONTAINER_PATH=/usr/src/app node app/bundle.js & docker-compose up --build"
"dev": "docker-compose up --build"
},
"version": "0.0.0",
"dependencies": {
Expand Down
6 changes: 6 additions & 0 deletions todo.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
Follow up with Stripe about the suspected card testing
- Consider migrating to v3 https://docs.stripe.com/payments/payment-intents/migration

Improvements to search engine:
- Make search use 'AND' instead of 'OR' for multiple terms
- Remove drafts and tell Paul
Expand Down Expand Up @@ -83,6 +86,8 @@ Come up with a workaround for [Silas's Dropbox business issue](https://mail.goog

Fix issue with favicon and [tell questioner](https://blot.im/questions/1202)

Can we use [transformers.js](https://huggingface.co/docs/transformers.js/en/api/models#module_models.SiglipModel) for content similarity or auto captioning?

Fix bug with bandcamp embeds in Word Documents and tell [Art](https://mail.google.com/mail/u/0/#inbox/FMfcgzGrcXlgNHJbDLkmkkRmrCGqzHJB)

Fix bug with template editor and ensure POST error messages are passed to client properly through ajax
Expand Down Expand Up @@ -449,6 +454,7 @@ Add support for paying with crypto, BTC ETH
- Tell [Chaz](https://mail.google.com/mail/u/1/#sent/165b726aa900158a)
- Tell [Anita](https://mail.google.com/mail/u/0/#inbox/FMfcgxwLsSWMtCTdmrbscFCFLggctmxH)
- Tell [Arc](https://mail.google.com/mail/u/0/#inbox/FMfcgzGtwqJkLxGTKPXhZPSWVjJqQbjs)
- Tell [Dmitriy](https://mail.google.com/mail/u/0/#inbox/FMfcgzGxSlPTwlRkJxQfntCdmbjFsrZC)

Improve Are.na importer so it handles descriptions + also other file types (e.g. PDF, text) and tell [Marco](https://mail.google.com/mail/u/0/#inbox/QgrcJHsBvDqvbgfkRJfBlwLBwlDHDncxVnl)

Expand Down

0 comments on commit dee9f07

Please sign in to comment.