1989 views|3 replies

247

Posts

4

Resources
The OP
 

[Domestic RISC-V Linux board Fang·Starlight VisionFive trial report] Nodejs development on Starlight board 3: Family photo wall [Copy link]

 

In the first two articles, I shared some of my own nodejs programs to implement the corresponding functions.

There are also many open source projects developed using nodejs; because its core is javascript, it is also very easy to run.

So I was looking for an open source photo wall code to run on, and this one was perfect for a single board computer for home use.

I tried looking for it and found a project for which xiekailian provided source code five years ago:

链接已隐藏,如需查看请登录或者注册
.

After downloading the code, there is no description file for the project, so you can only view the code to understand how it runs.

After some attempts, I found that the code was incomplete and some data tables were missing.

I reviewed the code again in detail and improved the database initialization part and the function of automatically retrieving the latest uploaded pictures on the home page.

The new code can be downloaded from

链接已隐藏,如需查看请登录或者注册
, remember it is the StarFive branch.

In this code, the default username is test and the password is 123456

Here’s how it works:

# 重新安装当前系统上的sqlite3
npm uninstall3 sqlite3
npm install sqlite3

# 初始化 sqlite数据库
node userSetup.js

# 启动服务
npm start

Please note that you must reinstall sqlite3, otherwise it may not work properly.

After startup, you can see the startup information:

Then, you can visit the URL: http://development board ip:3000 to enter the family photo wall:

The default user name is test and the password is 123456. You can also register a new user.

After logging in for the first time, a photo wall interface is displayed by default:


The default images here are in the public/images directory and can be replaced by yourself.

Click "My Album" to upload pictures:

After uploading the pictures, they will be displayed in a list. When you visit the homepage again, the latest pictures will be automatically called:

If multiple people are registered and have uploaded photos, they can see each other's photos.

Just like that, a family photo wall is quickly built. Do you want to try it right away? ? ?

image.png (43.32 KB, downloads: 0)

image.png
This post is from Domestic Chip Exchange

Latest reply

I don't know what it is, what device is this used on, TV or computer?   Details Published on 2022-7-4 15:29
 
 

6818

Posts

11

Resources
2
 
Thanks for sharing, wonderful work!
This post is from Domestic Chip Exchange
 
 
 

1573

Posts

0

Resources
3
 

I don't know what it is, what device is this used on, TV or computer?

This post is from Domestic Chip Exchange

Comments

Linux device, capable of running nodejs  Details Published on 2022-7-4 15:46
 
 
 

247

Posts

4

Resources
4
 
se7ens posted on 2022-7-4 15:29 I don't know what it is, but I want to ask what device this is used on, TV or computer?

A Linux device that can run nodejs.

In addition, the access is in the form of a web page.

This post is from Domestic Chip Exchange
 
 
 

Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list