All Projects → Innei → Moment

Innei / Moment

Licence: mit
一瞬,记录美好瞬间。

Labels

Projects that are alternatives of or similar to Moment

date-format
A reliable way to format dates and times in Elm.
Stars: ✭ 48 (+54.84%)
Mutual labels:  moment
dayjs
Extended fork of Day.js - 2KB immutable date library alternative to Moment.js
Stars: ✭ 36 (+16.13%)
Mutual labels:  moment
React Datepicker
A simple and reusable datepicker component for React
Stars: ✭ 6,206 (+19919.35%)
Mutual labels:  moment
chronos
One library to rule the time
Stars: ✭ 17 (-45.16%)
Mutual labels:  moment
moment-dayjs-codemod
A Codemod to migrate from moment.js to day.js
Stars: ✭ 20 (-35.48%)
Mutual labels:  moment
React Native Timeago
An auto-updating timeago component for React Native using moment.js
Stars: ✭ 339 (+993.55%)
Mutual labels:  moment
moment-recur-ts
Conversion of the moment-recur library into TypeScript.
Stars: ✭ 17 (-45.16%)
Mutual labels:  moment
Dayjs
⏰ Day.js 2kB immutable date-time library alternative to Moment.js with the same modern API
Stars: ✭ 37,373 (+120458.06%)
Mutual labels:  moment
ng2-timezone-selector
A simple Angular module to create a timezone selector using moment-timezone.
Stars: ✭ 12 (-61.29%)
Mutual labels:  moment
Angular Moment Picker
Angular Moment Picker is an AngularJS directive for date and time picker using Moment.js.
Stars: ✭ 536 (+1629.03%)
Mutual labels:  moment
node-red-contrib-moment
Node-Red Node that produces formatted Date/Time output using the Moment.JS library. Timezone, dst and locale aware.
Stars: ✭ 31 (+0%)
Mutual labels:  moment
moment-cache
⏱ Simple utility to cache moment.js results and speed up moment calls.
Stars: ✭ 29 (-6.45%)
Mutual labels:  moment
Twix.js
⌛️↔️ A date range plugin for moment.js
Stars: ✭ 374 (+1106.45%)
Mutual labels:  moment
imrc-datetime-picker
(Improved) React component datetime picker by momentjs 📆
Stars: ✭ 21 (-32.26%)
Mutual labels:  moment
React Article Bucket
总结,积累,分享,传播JavaScript各模块核心知识点文章全集,欢迎star,issue(勿fork,内容可能随时修改)。webpack核心内容部分请查看专栏: https://github.com/liangklfangl/webpack-core-usage
Stars: ✭ 750 (+2319.35%)
Mutual labels:  moment
relative.time.parser
Moment.js Plugin for parsing Relative Time Strings
Stars: ✭ 13 (-58.06%)
Mutual labels:  moment
moment-holiday
A Moment.js plugin for handling holidays. NO LONGER MAINTAINED (DEPRECATED)
Stars: ✭ 82 (+164.52%)
Mutual labels:  moment
Emptyd Admin Webpack
基于typescript react webpack的脚手架
Stars: ✭ 30 (-3.23%)
Mutual labels:  moment
Moment.php
Parse, validate, manipulate, and display dates in PHP w/ i18n support. Inspired by moment.js
Stars: ✭ 900 (+2803.23%)
Mutual labels:  moment
Date Io
Abstraction over common javascript date management libraries
Stars: ✭ 382 (+1132.26%)
Mutual labels:  moment

一瞬

一瞬 (Moment),目的显而易见,就是希望它能够记录下生活中的美好瞬间。

后端正在测试和完善,咕咕咕咕

后端使用 Express + MongoDB 开发。

后端仓库地址: https://github.com/Innei/Moment-server

即刻体验:http://111.229.4.42/#/

后台: http://111.229.4.42/#/master

用户名: Innei

密码: qaz123..qqaa

preview:

快速构建

yarn 为例

cd
# 构建前端
git clone https://github.com/Innei/moment.git
cd moment
yarn

# 构建后端
# 注意 您已正确安装了 redis 和 MongoDB
cd 
git clone http://github.com/Innei/moment-server.git
cd moment-server
yarn

经过以上的步骤,已经正确的搭建完了主要的环境。接下你可以配合 nginx 等把该项目托管到网站上。

托管生产环境

接下来,我会以 nginx 为例,简要的说明如何构建。

cd ~/moment
mkdir -p /home/wwwroot/www
yarn build --modern
cd ~/moment-server
cp .env.example .env
yarn prod

通过以上的步骤已经把前端编译成静态页面,后端监听在本地 3000 端口上。使用 yarn build --modern 可以编译一个速度更快,体积更小的仅支持现代浏览器的版本,你也可以去掉 --modern 参数来编译一个兼容更多浏览器的版本。

接下来我们使用 nginx 来启用反向代理,将 /api 反向代理到本地的 3000 端口。

sudo vim /etc/nginx/sites-enabled/moment.conf

在该文件中写入



server {

	server_name example.com; #在这里输入你绑定的域名
	root /home/wwwroot/www;

	location / {
		try_files $uri $uri/ /index.html;
	}

	# 反代
	location /api {
		proxy_set_header Host $host;
		proxy_set_header X-Real-IP $remote_addr;
		proxy_set_header REMOTE-HOST $remote_addr;
		proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
		proxy_pass http://127.0.0.1:3000;
	}
    

# gzip
gzip on;
gzip_vary on;
gzip_proxied any;
gzip_comp_level 6;
gzip_types text/plain text/css text/xml application/json application/javascript application/rss+xml application/atom+xml image/svg+xml;

}
nginx -s reload

即刻访问你的绑定的网址,开始初始化。

浏览器兼容性

此项目使用 ES6 以及最新 CSS 规范编写,顾不支持旧版浏览器。

Chrome >= 76
Firefox >= 70
Safari >= 12
etc.

做出贡献

接下来,我们来构建开发环境。

cd ~/moment
yarn serve .
cd ~/moment-server
yarn start

环境变量

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].